Skip to content

Update references to bootstrap.js X-CSRF-TOKEN behavior #5382

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

Merged
merged 1 commit into from
Aug 22, 2019
Merged

Update references to bootstrap.js X-CSRF-TOKEN behavior #5382

merged 1 commit into from
Aug 22, 2019

Conversation

jessarcher
Copy link
Member

@jessarcher jessarcher commented Aug 21, 2019

This addresses a change in behaviour in a PR I have submitted at laravel/laravel#5083. It should not be considered for merging unless that PR is merged and released. This has now been merged.

This PR addresses the X-CSRF-TOKEN header no longer being automatically sent in bootstrap.js.

Because we include an XSRF-TOKEN cookie, Axios has already been automatically sending an X-XSRF-TOKEN header for us on same-origin requests. This makes the X-CSRF-TOKEN header we are sending redundant.

I have tried to keep the changes minimal without making any overly opinionated changes to the structure of the documentation, however, it may be worth considering restructuring csrf.md so that the X-XSRF-TOKEN section becomes the main section for introducing the header-based verification approaches and to also make it clear that X-XSRF-TOKEN must be the encrypted value and X-CSRF-TOKEN must be unencrypted.

@jessarcher jessarcher marked this pull request as ready for review August 21, 2019 23:44
@taylorotwell taylorotwell merged commit 46d1de5 into laravel:master Aug 22, 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

Successfully merging this pull request may close these issues.

2 participants