feat: add security headers

This commit is contained in:
Rui Saraiva 2021-12-12 22:07:05 +00:00
parent 612fe2e58e
commit e56b36c158
No known key found for this signature in database
GPG Key ID: 63937B371A665CD0

View File

@ -4,4 +4,29 @@ module.exports = {
deviceSizes: [375, 750, 1125],
imageSizes: [56, 112, 185, 370, 370, 375, 540, 740, 750, 1080],
},
headers() {
return [
{
source: '/(.*)',
headers: [
{
key: 'X-XSS-Protection',
value: '1; mode=block',
},
{
key: 'X-Frame-Options',
value: 'SAMEORIGIN',
},
{
key: 'X-Content-Type-Options',
value: 'nosniff',
},
{
key: 'Content-Security-Policy',
value: `default-src 'self'; frame-ancestors 'self'`,
},
],
},
]
},
}