Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to set options? #19

Open
csrgxtu opened this issue Jul 5, 2016 · 2 comments
Open

how to set options? #19

csrgxtu opened this issue Jul 5, 2016 · 2 comments

Comments

@csrgxtu
Copy link

csrgxtu commented Jul 5, 2016

how do i set options

@artworkad
Copy link

@wesleyboar-fka-iosulfur
Copy link

wesleyboar-fka-iosulfur commented Aug 29, 2019

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. 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants