Skip to content

Commit 754055b

Browse files
committed
update documentation for SameSite cookie configurations
1 parent 72ae1f0 commit 754055b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The gem will automatically apply several headers that are related to security.
1515
- X-Permitted-Cross-Domain-Policies - [Restrict Adobe Flash Player's access to data](https://www.adobe.com/devnet/adobe-media-server/articles/cross-domain-xml-for-streaming.html)
1616
- Public Key Pinning - Pin certificate fingerprints in the browser to prevent man-in-the-middle attacks due to compromised Certificate Authorities. [Public Key Pinning Specification](https://tools.ietf.org/html/rfc7469)
1717

18-
It can also mark all http cookies with the secure attribute (when configured to do so).
18+
It can also mark all http cookies with the Secure, HttpOnly and SameSite attributes (when configured to do so).
1919

2020
`secure_headers` is a library with a global config, per request overrides, and rack middleware that enables you customize your application settings.
2121

@@ -296,17 +296,19 @@ config.cookies = {
296296
}
297297
```
298298

299-
#### SameSite cookies
299+
#### SameSite cookie configuration
300300

301301
SameSite cookies permit either `Strict` or `Lax` enforcement mode options.
302302

303303
```ruby
304304
config.cookies = {
305-
samesite: true # mark all cookies as SameSite (user agents default this to `Strict` enforcement mode)
305+
samesite: {
306+
strict: true # mark all cookies as SameSite=Strict
307+
}
306308
}
307309
```
308310

309-
`Strict` and `Lax` enforcement can also be specified using a Hash.
311+
`Strict` and `Lax` enforcement modes can also be specified using a Hash.
310312

311313
```ruby
312314
config.cookies = {

0 commit comments

Comments
 (0)