Menu

I Wrote Two CSPs, the One Being Enforced Isn't Mine
πŸ“°

I Wrote Two CSPs, the One Being Enforced Isn't Mine

DEV Community: astroΒ·Mustafa ERBAYΒ·9 days ago
#YlonPYE9
#devtoastro#devto#dev#policy#report
Reading 0:00
15s threshold

The cheapest way to audit security headers is to send the site a request and count the lines that come back. Mine come back like this:

curl -s -D - -o /dev/null https://mustafaerbay.com.tr/ | grep -i -E \ '^strict-transport|^x-content-type|^x-frame|^referrer-policy|^permissions-policy|^content-security'

Enter fullscreen mode

Exit fullscreen mode

Six lines. HSTS, nosniff, X-Frame-Options: SAMEORIGIN , Referrer-Policy, Permissions-Policy, and a Content-Security-Policy-Report-Only that runs to 562 bytes including its name. Reading the list feels good: the guy did his homework.

Then I actually read that sixth line. No report-uri in it. No report-to either. So I'm telling the browser "evaluate these rules and report violations to me" without giving it an address to report to. I checked the git history: that header has been live since 6 July 2026 (the nginx copy in the repo is a byte-for-byte mirror of the live file, and the line is identical on the server). Today is 6 November.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.