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 headers not properly set #1450

Closed
dstudzinski opened this issue Sep 3, 2019 · 0 comments
Closed

Cors headers not properly set #1450

dstudzinski opened this issue Sep 3, 2019 · 0 comments

Comments

@dstudzinski
Copy link
Contributor

dstudzinski commented Sep 3, 2019

Case

Cors headers are not properly set

Issue

Cors headers are not properly set which causes bugs like:

Access to fetch at 'URL1' from origin 'URL2' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'.

But problem is not only with 'Access-Control-Allow-Origin'. Even when this header is passed properly you have:

Access to fetch at 'http://127.0.0.1:2000/rxdb/tasks/' from origin 'http://localhost:5000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow-Credentials' header in the response is '' which must be 'true' when the request's credentials mode is 'include'.

Info

  • Environment: Node.js
  • Adapter: websql
  • Stack: ES6

Code

database.server({
  path: '/db',
  port,
  cors: true
});
dstudzinski pushed a commit to dstudzinski/rxdb that referenced this issue Sep 3, 2019
@pubkey pubkey closed this as completed in 7c6be2f Sep 3, 2019
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

1 participant