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

CORS not set when error returned #853

Open
lautarodragan opened this issue Feb 15, 2019 · 0 comments
Open

CORS not set when error returned #853

lautarodragan opened this issue Feb 15, 2019 · 0 comments
Labels

Comments

@lautarodragan
Copy link
Member

When running GET https://api.poetnetwork.net/tokens with an expired token, the response is Expired token., but CORS headers aren't set in the response, so an error is thrown in clients which implement CORS (browsers) which makes it impossible to read the response.

GET https://api.poetnetwork.net/tokens 422 (Unprocessable Entity)
Access to fetch at 'https://api.poetnetwork.net/tokens' from origin 'http://localhost:3001' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Uncaught (in promise) TypeError: Failed to fetch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant