mirror of
https://github.com/xHyroM/roles-bot.git
synced 2024-11-10 03:08:06 +01:00
secure headers
This commit is contained in:
parent
1044d2ddc2
commit
65b7c2f4c2
3 changed files with 27 additions and 1 deletions
|
@ -1,3 +1,14 @@
|
||||||
|
const { createSecureHeaders } = require("next-secure-headers");
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
assetPrefix: '/roles-bot/'
|
assetPrefix: '/roles-bot/',
|
||||||
|
async headers() {
|
||||||
|
return [{
|
||||||
|
source: "/(.*)",
|
||||||
|
headers: createSecureHeaders({
|
||||||
|
forceHTTPSRedirect: [true, { maxAge: 60 * 60 * 24 * 4, includeSubDomains: true }],
|
||||||
|
referrerPolicy: "same-origin",
|
||||||
|
}),
|
||||||
|
}];
|
||||||
|
},
|
||||||
}
|
}
|
14
packages/website/package-lock.json
generated
14
packages/website/package-lock.json
generated
|
@ -7,6 +7,7 @@
|
||||||
"name": "web",
|
"name": "web",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"next": "12.0.7",
|
"next": "12.0.7",
|
||||||
|
"next-secure-headers": "^2.2.0",
|
||||||
"react": "17.0.2",
|
"react": "17.0.2",
|
||||||
"react-dom": "17.0.2"
|
"react-dom": "17.0.2"
|
||||||
},
|
},
|
||||||
|
@ -4064,6 +4065,14 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/next-secure-headers": {
|
||||||
|
"version": "2.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/next-secure-headers/-/next-secure-headers-2.2.0.tgz",
|
||||||
|
"integrity": "sha512-C7OfZ9JdSJyYMz2ZBMI/WwNbt0qNjlFWX9afUp8nEUzbz6ez3JbeopdyxSZJZJAzVLIAfyk6n73rFpd4e22jRg==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/node-fetch": {
|
"node_modules/node-fetch": {
|
||||||
"version": "2.6.1",
|
"version": "2.6.1",
|
||||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
|
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
|
||||||
|
@ -8405,6 +8414,11 @@
|
||||||
"watchpack": "2.3.0"
|
"watchpack": "2.3.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"next-secure-headers": {
|
||||||
|
"version": "2.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/next-secure-headers/-/next-secure-headers-2.2.0.tgz",
|
||||||
|
"integrity": "sha512-C7OfZ9JdSJyYMz2ZBMI/WwNbt0qNjlFWX9afUp8nEUzbz6ez3JbeopdyxSZJZJAzVLIAfyk6n73rFpd4e22jRg=="
|
||||||
|
},
|
||||||
"node-fetch": {
|
"node-fetch": {
|
||||||
"version": "2.6.1",
|
"version": "2.6.1",
|
||||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
|
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"next": "12.0.7",
|
"next": "12.0.7",
|
||||||
|
"next-secure-headers": "^2.2.0",
|
||||||
"react": "17.0.2",
|
"react": "17.0.2",
|
||||||
"react-dom": "17.0.2"
|
"react-dom": "17.0.2"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue