Skip to content

Commit

Permalink
Move security headers away from nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
vivi committed Feb 26, 2021
1 parent 423fa8f commit a4713ef
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,26 @@ const config = {
permanent: false,
},
]),
headers: async () =>
Promise.resolve([
{
source: "/(.*)",
headers: [
{
key: "Content-Security-Policy",
value: "upgrade-insecure-requests; frame-ancestors 'none';",
},
{
key: "Referrer-Policy",
value: "strict-origin-when-cross-origin",
},
{
key: "X-Content-Type-Options",
value: "nosniff",
},
],
},
]),
}

const withBundleAnalyzer = require("@next/bundle-analyzer")({
Expand Down

0 comments on commit a4713ef

Please sign in to comment.