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 block #2

Open
makker-nl opened this issue Jun 22, 2018 · 2 comments
Open

CORS block #2

makker-nl opened this issue Jun 22, 2018 · 2 comments

Comments

@makker-nl
Copy link

With the first implementation of the employee table, I get the following, due to the REST call:
'Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:3012/employees. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).'

In Firefox it should be possible to solve it using security.fileuri.strict_origin_policy.
Setting it to false and restarting FF did not help.

For Chrome:
Start chrome with the following options: --disable-web-security --user-data-dir , for instance:

c:\Program Files (x86)\Google\Chrome\Application\chrome.exe --disable-web-security --user-data-dir

@geertjanw
Copy link
Owner

Thanks. Didn’t need to do this in Chrome or maybe I had done it already earlier.

@geertjanw
Copy link
Owner

Maybe CORS is not a problem with this one, which should have been the one referenced in the instructions: https://scotch.io/tutorials/json-server-as-a-fake-rest-api-in-frontend-development

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