-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Document CSRF middleware. #4976
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
Conversation
ravage84
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
en/controllers/middleware.rst
Outdated
| endpoints. | ||
|
|
||
| .. versionadded:: 3.5.0 | ||
| The ``CsrfProtectionMiddleware`` was added in 3.5.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this note be under "Cross Site Request Forgery (CSRF) Middleware"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it should.
| ---------------------------------- | ||
|
|
||
| In addition to request data parameters, CSRF tokens can be submitted through | ||
| a special ``X-CSRF-Token`` header. Using a header often makes it easier to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Point to docs how to do it?
Is it enabled by default?
Should it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting headers is part of whatever client library you happen to be using.
Refs cakephp/cakephp#10561