Skip to content

Commit

Permalink
docs(nxdev): add security headers (nrwl#11240)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcabanes authored Jul 21, 2022
1 parent b89e321 commit 68a2a11
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions nx-dev/nx-dev/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,24 @@ module.exports = withNx({
env: {
VERCEL: process.env.VERCEL,
},
async headers() {
return [
{
source: '/:path*',
headers: [
{ key: 'X-DNS-Prefetch-Control', value: 'on' },
{
key: 'Strict-Transport-Security',
value: 'max-age=63072000; includeSubDomains; preload',
},
{ key: 'X-XSS-Protection', value: '1; mode=block' },
{ key: 'X-Content-Type-Options', value: 'nosniff' },
{ key: 'X-Frame-Options', value: 'DENY' },
{ key: 'Referrer-Policy', value: 'no-referrer' },
],
},
];
},
async redirects() {
const rules = [];

Expand Down

0 comments on commit 68a2a11

Please sign in to comment.