Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
rzhade3 authored Dec 6, 2024
1 parent 869e8a6 commit 399706f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ end
```

### Deprecated Configuration Values
* `block_all_mixed_content` - this value is deprecated in favor of `upgrade_insecure_requests`. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/content-security-policy/block-all-mixed-content for more information.
* `block_all_mixed_content` - this value is deprecated in favor of `upgrade_insecure_requests`. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/block-all-mixed-content for more information.

## Default values

Expand All @@ -101,11 +101,11 @@ All headers except for PublicKeyPins and ClearSiteData have a default value. The
```
content-security-policy: default-src 'self' https:; font-src 'self' https: data:; img-src 'self' https: data:; object-src 'none'; script-src https:; style-src 'self' https: 'unsafe-inline'
strict-transport-security: max-age=631138519
X-Content-Type-Options: nosniff
x-content-type-options: nosniff
x-download-options: noopen
X-Frame-Options: sameorigin
x-frame-options: sameorigin
x-permitted-cross-domain-policies: none
X-Xss-Protection: 0
x-xss-protection: 0
```

## API configurations
Expand Down
6 changes: 3 additions & 3 deletions lib/secure_headers/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
module SecureHeaders
class Railtie < Rails::Railtie
isolate_namespace SecureHeaders if defined? isolate_namespace # rails 3.0
conflicting_headers = ["X-Frame-Options", "X-XSS-Protection",
conflicting_headers = ["x-frame-options", "x-xss-protection",
"x-permitted-cross-domain-policies", "x-download-options",
"X-Content-Type-Options", "strict-transport-security",
"x-content-type-options", "strict-transport-security",
"content-security-policy", "content-security-policy-report-only",
"Public-Key-Pins", "Public-Key-Pins-Report-Only", "referrer-policy"]
"public-key-pins", "public-key-pins-report-only", "referrer-policy"]

initializer "secure_headers.middleware" do
Rails.application.config.middleware.insert_before 0, SecureHeaders::Middleware
Expand Down

0 comments on commit 399706f

Please sign in to comment.