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

Handling CORS #1

Open
EternalDeiwos opened this issue Jan 25, 2022 · 2 comments
Open

Handling CORS #1

EternalDeiwos opened this issue Jan 25, 2022 · 2 comments

Comments

@EternalDeiwos
Copy link

CORS is a running issue for candidates using this API. Could you provide instructions for how to deal with it?

My current attempt is to specify the following environment:

allowed_origins=http://localhost:3000,https://...
@dewald-els
Copy link
Owner

dewald-els commented Jan 25, 2022

Probably forgetting to add the correct content type when making a post, patch or delete. The API uses cors package to allow access from anywhere

It must have application/json content-type header for any post, put, delete or patch requests

Edit To clarify: Json-server uses it internally

@EternalDeiwos
Copy link
Author

This was for a GET request actuallly... see the issue.

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

2 participants