Forked from the nodejs package expressjs cors. Now it is just a simple and opinionated cors middleware for Deno oak.
Repository
Current version released
3 years ago
Dependencies
deno.land/x
Versions
oak_cors
Forked from the nodejs package expressjs cors. Now it is just a simple and opinionated cors middleware for Deno oak.
Example
import { CORS } from "https://deno.land/x/oak_cors@v0.1.1/mod.ts";
import { Application } from "https://deno.land/x/oak/mod.ts";
const app = new Application();
app.use(CORS());
// other middleware
await app.listen(":80");
If you use the default options, it will work as both origin: true
and
credentials: true
.