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

Add note about Ajax and CSRF-Token [ci skip] #18105

Merged
merged 1 commit into from Dec 22, 2014
Merged

Add note about Ajax and CSRF-Token [ci skip] #18105

merged 1 commit into from Dec 22, 2014

Conversation

andreynering
Copy link
Contributor

No description provided.

which adds a header called `X-CSRF-Token` on every non-GET Ajax call with the security token. Without this
header, your non-GET requests won't be accepted by Rails. If you want to use another library to make Ajax
calls, you will have to find how add the security token as a default header for Ajax calls in your library.
To get to token have a look at the `<meta name='csrf-token' content='THE-TOKEN>'>` tag printed by
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

content='THE-TOKEN>'> should be content='THE-TOKEN'>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arthurnn arthurnn added the docs label Dec 20, 2014
zzak pushed a commit that referenced this pull request Dec 22, 2014
Add note about Ajax and CSRF-Token [ci skip]
@zzak zzak merged commit bac74d6 into rails:master Dec 22, 2014
@andreynering andreynering deleted the guides-csrf branch December 22, 2014 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants