Skip to content
This repository has been archived by the owner on Jun 8, 2020. It is now read-only.

CORS headers not sent #70

Open
benburwell opened this issue May 22, 2015 · 0 comments
Open

CORS headers not sent #70

benburwell opened this issue May 22, 2015 · 0 comments

Comments

@benburwell
Copy link

When I try to use XMLHttpRequest to POST data to /api/events, I get an error related to CORS in the browser console.

I was able to solve the issue by adding the cors package and using it as a middleware for express (just adding app.use(cors()); to index.js).

It seems like this would be a fairly common use case and I was surprised that this isn't set up out-of-the box. Is this something that should be added? If so, I'd be happy to submit a PR.

Thanks!

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

No branches or pull requests

1 participant