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 example #7

Open
typeoneerror opened this issue Nov 15, 2015 · 3 comments
Open

CORS example #7

typeoneerror opened this issue Nov 15, 2015 · 3 comments

Comments

@typeoneerror
Copy link

Following along with a basic tutorial for jsonapi-resources, I got stuck on the Ember.js side when I tried to load data:

[Report Only] Refused to connect to 'http://localhost:3000/articles/1/author' because it violates the following Content Security Policy directive: "connect-src 'self' ws://localhost:49152 ws://0.0.0.0:49152 http://0.0.0.0:4200/csp-report".

XMLHttpRequest cannot load http://localhost:3000/articles/2/author. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:4200' is therefore not allowed access.

Would make sense to add a demo of utilizing https://github.com/cyu/rack-cors (or similar) to configure the Rails side of things. If this is in the demo, I can't find it.

Might even be pretty sweet to include rack-cors as a dependency and provide a reasonable default setup.

@typeoneerror
Copy link
Author

Actually, I can work on a PR to this demo if that helps. Let me know.

@lgebhardt
Copy link
Member

@typeoneerror Sorry for the late reply. A PR would be appreciated. Thanks.

@sebyx07
Copy link

sebyx07 commented May 25, 2016

Start ember with

ember s --proxy http://localhost:3000

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

3 participants