explain why we avoid iframing

This commit is contained in:
Nils Norman Haukås 2019-04-17 10:48:28 +02:00
parent 5cc772c48b
commit 0ac72104b8
No known key found for this signature in database
GPG key ID: BB8DD87F83E1359E

View file

@ -81,6 +81,8 @@ const init = async () => {
if (!request.response.header) {
return h.continue
}
// Prevent site from being iframed since that might lead people to sniff
// out passwords
request.response.header('X-FRAME-OPTIONS', 'deny')
if (process.env.NODE_ENV !== 'test') {
// CSP breaks browser-sync, so we ignore it for development