fix(nginx): remove HSTS from opt-in security headers to avoid duplicate - #21
Open
ma-04 wants to merge 1 commit into
Open
fix(nginx): remove HSTS from opt-in security headers to avoid duplicate#21ma-04 wants to merge 1 commit into
ma-04 wants to merge 1 commit into
Conversation
The nginx-proxy edge layer in front of every FlyWP site already sends its own Strict-Transport-Security header unconditionally, regardless of the per-site security-headers toggle. Now that the add_header shadowing bug (35b254a) is fixed, sites with the toggle on also send their own HSTS from security-headers.conf, resulting in two Strict-Transport-Security headers in the response. Drop HSTS from security-headers.conf since the edge already provides baseline HSTS to every site independent of the toggle; deduping at the edge is out of scope here since that's a separate system. The toggle continues to control CSP, X-Frame-Options, X-Content-Type-Options, X-XSS-Protection, and Referrer-Policy.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
WalkthroughRemoves the HSTS directive from the shared Nginx security headers configuration while preserving the remaining security headers. Changes
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The nginx-proxy edge layer in front of every FlyWP site already sends its own Strict-Transport-Security header unconditionally, regardless of the per-site security-headers toggle. Now that the add_header shadowing bug (35b254a) is fixed, sites with the toggle on also send their own HSTS from security-headers.conf, resulting in two Strict-Transport-Security headers in the response.
Drop HSTS from security-headers.conf since the edge already provides baseline HSTS to every site independent of the toggle; deduping at the edge is out of scope here since that's a separate system. The toggle continues to control CSP, X-Frame-Options, X-Content-Type-Options, X-XSS-Protection, and Referrer-Policy.
Summary by CodeRabbit