Security headers that vanish on one path
nginx’s add_header is inherited only when a block has none of its own. Compare response headers for two paths with curl -I and find the location that drops HSTS and CSP.
What you’re looking at
nginx’s add_header is inherited only when a block has none of its own. Compare response headers for two paths with curl -I and find the location that drops HSTS and CSP.
Your goal: Find the location that silently drops the site’s security headers.
- Briefing
- the story: what happened and what evidence you were handed.
- Terminal
- the dark box. It is a pretend Linux shell that runs in your browser. Type a command and press Enter. Nothing you type touches a real system.
- Walkthrough
- the numbered path. Each step says what to type and what you should see. Hints open one at a time.
- Answer boxes
- under each question step. Type what you found and press Check.
Words you will meet
- HSTS
- HTTP Strict Transport Security, which tells browsers to use HTTPS only
- CSP
- Content Security Policy, which tells browsers what scripts may run
Start with step 1 in the walkthrough. Every step says what to do and what you should see. The whole thing takes about 2 min to talk through.
Briefing
The security headers grader gives portal.corp.example an A on the home page and an F on /account/. The config sets the headers once at server level.
nginx rule: a location that has any add_header directive does not inherit add_header lines from the server block. It is a common surprise.
edge-02 · Web config review
Type help for the command list and objectives for your tasks. Everything runs in this browser.
Up and down arrows walk your history. Ctrl+L clears the screen. Try help, ls, and objectives.
The whole walkthrough
Every step in order, written to be read aloud: 252 words, about 2 min. It gives away every answer, so try the steps first.