mirror of
https://github.com/skidoodle/albert.lol.git
synced 2025-02-15 06:09:15 +01:00
add csp
This commit is contained in:
parent
99478da18e
commit
555028f40b
3 changed files with 43 additions and 1 deletions
|
@ -1,3 +1,39 @@
|
|||
const nextSafe = require("next-safe");
|
||||
|
||||
module.exports = {
|
||||
async headers() {
|
||||
return [
|
||||
{
|
||||
source: "/:path*",
|
||||
headers: nextSafe({
|
||||
contentTypeOptions: "nosniff",
|
||||
contentSecurityPolicy: {
|
||||
"base-uri": "'none'",
|
||||
"child-src": "'none'",
|
||||
"connect-src": "'self'",
|
||||
"default-src": "'self'",
|
||||
"font-src": "'self'",
|
||||
"frame-src": "'none'",
|
||||
"img-src": "'self'",
|
||||
"frame-ancestors": "'none'",
|
||||
"manifest-src": "'self'",
|
||||
"media-src": "'self'",
|
||||
"object-src": "'none'",
|
||||
"prefetch-src": "'self'",
|
||||
"script-src": "'self'",
|
||||
"style-src": "'self'",
|
||||
"worker-src": "'self'",
|
||||
"form-action": "'self'",
|
||||
reportOnly: false,
|
||||
},
|
||||
referrerPolicy: "same-origin",
|
||||
xssProtection: "1; mode=block",
|
||||
}),
|
||||
},
|
||||
];
|
||||
},
|
||||
};
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
reactStrictMode: true,
|
||||
|
|
|
@ -9,8 +9,9 @@
|
|||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"next": "12.3.1",
|
||||
"aws-sdk": "^2.1228.0",
|
||||
"next": "12.3.1",
|
||||
"next-safe": "^3.2.1",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"react-fade-in": "^2.0.1",
|
||||
|
|
|
@ -713,6 +713,11 @@ nanoid@^3.3.4:
|
|||
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab"
|
||||
integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==
|
||||
|
||||
next-safe@^3.2.1:
|
||||
version "3.2.1"
|
||||
resolved "https://registry.yarnpkg.com/next-safe/-/next-safe-3.2.1.tgz#76bb6deb2b11a39318e5b962a6da4e57584bf77f"
|
||||
integrity sha512-2BBbnendVIlbUjrvV/N6cotuba71i2IIczo0dqmpZu9oSl2PlN6hYML22fidcqXZILwghyXULIy4lxyAgPz+Xg==
|
||||
|
||||
next@12.3.1:
|
||||
version "12.3.1"
|
||||
resolved "https://registry.yarnpkg.com/next/-/next-12.3.1.tgz#127b825ad2207faf869b33393ec8c75fe61e50f1"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue