-
Notifications
You must be signed in to change notification settings - Fork 21.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow opting out of the
SameSite
cookie attribute when setting a co…
…okie. Since 7ccaa12 it's not been possible to not include `SameSite` on your cookies. `SameSite` is recommended, but it's not a required field, and you should be able to opt out of it. This PR introduces that ability: you can opt out of `SameSite` by passing `same_site: false`. ```ruby cookies[:foo] = { value: "bar", same_site: false } ``` Previously, this incorrectly set the `SameSite` attribute to the value of the `cookies_same_site_protection` setting. #44934 added docs saying that you could pass `nil` as a value, but that also would fall back to the default (`:lax`).
- Loading branch information
1 parent
c704da6
commit d29e755
Showing
3 changed files
with
52 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters