upd: update the nginx proxy config#27
Conversation
📝 WalkthroughWalkthroughAdded Nginx security controls to block hidden files and sensitive file extensions via regex location blocks, implemented security response headers including Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
app/proxy/nginx.conf.template (1)
25-27: Usestrict-origin-when-cross-originfor a stricterReferrer-Policydefault.At line 27,
no-referrer-when-downgradeis permissive for HTTPS cross-origin scenarios. Modern security baselines (OWASP, MDN) recommendstrict-origin-when-cross-originas a stronger default unless explicitly required otherwise.Proposed change
- add_header Referrer-Policy "no-referrer-when-downgrade" always; + add_header Referrer-Policy "strict-origin-when-cross-origin" always;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@app/proxy/nginx.conf.template` around lines 25 - 27, The Referrer-Policy header currently uses "no-referrer-when-downgrade" which is permissive for HTTPS cross-origin requests; update the nginx configuration line that sets the Referrer-Policy (the add_header Referrer-Policy declaration) to use "strict-origin-when-cross-origin" instead so the policy is stricter for cross-origin referrals while preserving same-origin full referrers.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@app/proxy/nginx.conf.template`:
- Around line 25-27: The Referrer-Policy header currently uses
"no-referrer-when-downgrade" which is permissive for HTTPS cross-origin
requests; update the nginx configuration line that sets the Referrer-Policy (the
add_header Referrer-Policy declaration) to use "strict-origin-when-cross-origin"
instead so the policy is stricter for cross-origin referrals while preserving
same-origin full referrers.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 175218ef-6627-4620-bd4d-afb0a1cad1ee
📒 Files selected for processing (1)
app/proxy/nginx.conf.template
Summary by CodeRabbit