Web Security & OWASP (50 Qs)•Part 1: Candid Security Experience, Threat Modeling & Fundamentals (1 - 10)
HTTP Security Headers Suite: HSTS, X-Content-Type-Options, Referrer-Policy, and Permissions-Policy.
Production Security Headers Reference
Configuring modern HTTP security response headers transforms standard web browsers into fortified execution environments.
sql
+--------------------------------------------------------------------------+
| Recommended Production Security Headers |
+--------------------------------------------------------------------------+
| Strict-Transport-Security: max-age=63072000; includeSubDomains; preload |
| X-Content-Type-Options: nosniff |
| X-Frame-Options: DENY |
| Referrer-Policy: strict-origin-when-cross-origin |
| Permissions-Policy: camera=(), microphone=(), geolocation=() |
| Cross-Origin-Opener-Policy: same-origin |
| Cross-Origin-Resource-Policy: same-origin |
+--------------------------------------------------------------------------+
Header Specifications
Strict-Transport-Security (HSTS): Forces browser to communicate exclusively over HTTPS for the next 2 years (63,072,000 seconds). Defends against SSL stripping attacks.X-Content-Type-Options: nosniff: Blocks browsers from MIME-sniffing responses away from the declaredContent-Type(e.g. executing a user-uploadedavatar.jpgas malicious JavaScript).Referrer-Policy: strict-origin-when-cross-origin: Sends the full URL path on same-origin requests, but sends only the domain on cross-origin HTTPS requests, preventing token leakage in URL query parameters.Permissions-Policy: Explicitly disables hardware APIs (camera, microphone, accelerometer, USB) that your application does not require.