Security · OWASP
How would you answer an interview scenario involving security headers?
In an interview, I would first define security headers and the problem it solves, then explain how I would configure HTTPS and HSTS appropriately, use CSP tailored to the application, prevent unwanted framing, set secure cookie attributes separately, test headers in each environment, and avoid obsolete headers that provide no protection. I would also call out the main failure mode: copying a restrictive header template without testing can break legitimate application behavior or create a false sense of security while core vulnerabilities remain. Finally, I would describe how I would test, monitor, and safely roll back or recover the solution.