Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
Add documentation on cookie_samesite setting in FrameworkBundle#10202
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -153,6 +153,20 @@ be securely controlled from the server side. | ||
| with an expiry time of ``time()`` + ``cookie_lifetime`` where the time is taken | ||
| from the server. | ||
| Session Cookie SameSite | ||
| ~~~~~~~~~~~~~~~~~~~~~~~ | ||
| .. versionadded:: 4.2 | ||
| The option to use SameSite cookies for session was introduced in 4.2. | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. for sessions? | ||
| SameSite cookies are a measure to protect against Cross Site Forgery Request (CSRF) attacks by preventing the cookies to be sent to the server if a request was not originated from the domain the cookies are for. | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Text should be at around 80 chars | ||
| There are two modes, ``lax`` and ``strict``. When set to ``strict`` cookies will never be sent along with the request, whereas with ``lax`` the cookies will be sent with HTTP GET requests, but not with HTTP POST requests. | ||
| This option can be set with the ``cookie_samesite`` setting. | ||
| This option will be available for sessions in PHP as of version 7.3, but Symfony has a polyfill for older versions of PHP, so it can also be used in PHP version lower than 7.3 as well. | ||
| Configuring Garbage Collection | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||