HTTP Security
Cheat sheet · https://pcornel.dk/topic.php?topic=4747
Answer
HTTP security covers protecting web traffic and responses: HTTPS everywhere, security headers, secure cookies, correct methods and status codes, and limiting what error pages reveal.
Remember
- Serve everything over HTTPS.
- Add security headers.
- Keep error pages minimal.
First checks
curl -sI https://<site>— security headers- HTTP methods allowed — curl -X OPTIONS -i
- Server version disclosure — header review
Commands
curl -I
Verify in this order
request → server config → response headers
Where it usually breaks
First mismatch in asset/subject identity → trust/authentication → authorization/policy → enforcement/control → telemetry/detection → protected outcome/response; preserve identity/policy/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4747