Skip to content

Commit 171ca58

Browse files
committed
add documentation on secure cookie feature
1 parent bc31dc6 commit 171ca58

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ 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).
19+
1820
`secure_headers` is a library with a global config, per request overrides, and rack middleware that enables you customize your application settings.
1921

2022
## Use
@@ -29,6 +31,7 @@ All `nil` values will fallback to their default values. `SecureHeaders::OPT_OUT`
2931

3032
```ruby
3133
SecureHeaders::Configuration.default do |config|
34+
config.secure_cookies = true # mark all cookies as "secure"
3235
config.hsts = "max-age=#{20.years.to_i}; includeSubdomains; preload"
3336
config.x_frame_options = "DENY"
3437
config.x_content_type_options = "nosniff"

0 commit comments

Comments
 (0)