Skip to content

Commit

Permalink
feat: add security headers
Browse files Browse the repository at this point in the history
  • Loading branch information
ruisaraiva19 committed Dec 12, 2021
1 parent 612fe2e commit e56b36c
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'`,
},
],
},
]
},
}

0 comments on commit e56b36c

Please sign in to comment.