Open csrgxtu opened 8 years ago
@csrgxtu should be cors(options) https://github.com/koajs/cors/blob/master/index.js#L19
To answer, I present one change to the final statement from the example code in "Quick Start" of README.md
at tag 3.0.0
:
const Koa = require('koa');
const cors = require('@koa/cors');
const app = new Koa();
app.use(cors({
// …
allowMethods: 'GET,HEAD',
keepHeadersOnError: true,
// …
}));
Does this help?
Edit: The post is three years old. 😅
how do i set options