Harden a web application with browser controls
8 steps · about 4 h 20 min · Intermediate
- Map the browser threat surface (guide, MDN Web Docs, 30 min)
Prioritise core controls before individual headers.
- Configure transport security (guide, MDN Web Docs, 35 min)
Protect requests from interception and downgrade.
- Design a content security policy (guide, MDN Web Docs, 45 min)
Restrict executable content and add defence in depth against injection.
- Deploy CSP carefully (guide, MDN Web Docs, 35 min)
Use report-only testing before enforcing a strict policy.
- Restrict cross-origin access (guide, MDN Web Docs, 35 min)
Grant only the origins and resources an application needs.
- Protect session cookies (guide, MDN Web Docs, 35 min)
Use secure scope and attributes for sensitive state.
- Limit referrer leakage (guide, MDN Web Docs, 25 min)
Control which URL details leave the site.
- Block MIME confusion (guide, MDN Web Docs, 20 min)
Prevent browsers from interpreting resources as an unexpected type.