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

Consider using ng-rails-csrf instead of CORS #2

Open
wstrinz opened this issue Jun 25, 2015 · 0 comments
Open

Consider using ng-rails-csrf instead of CORS #2

wstrinz opened this issue Jun 25, 2015 · 0 comments

Comments

@wstrinz
Copy link

wstrinz commented Jun 25, 2015

CORS is probably overkill for this app since the client and server are on the same origin; I'm not sure we want to expose resources to other origins.

Also I think this would mean that any ajax requests dependant on sessions (eg anything that references current_user) won't work because of the null_session option.

There's an ng-rails-csrf gem that handles grabbing the CSRF token and setting it on every AJAX request which worked for cliff and I on the angular-donuts app.

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