Fix CSP middleware
This commit is contained in:
40
config/env/production/middlewares.ts
vendored
Normal file
40
config/env/production/middlewares.ts
vendored
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
export default [
|
||||||
|
"strapi::logger",
|
||||||
|
"strapi::errors",
|
||||||
|
//'strapi::security',
|
||||||
|
{
|
||||||
|
name: "strapi::security",
|
||||||
|
config: {
|
||||||
|
contentSecurityPolicy: {
|
||||||
|
useDefaults: true,
|
||||||
|
directives: {
|
||||||
|
"connect-src": ["'self'", "https:"],
|
||||||
|
"img-src": [
|
||||||
|
"'self'",
|
||||||
|
"data:",
|
||||||
|
"blob:",
|
||||||
|
"market-assets.strapi.io",
|
||||||
|
"192.168.0.211:9000",
|
||||||
|
"beyonder.synology.me:9000",
|
||||||
|
],
|
||||||
|
"media-src": [
|
||||||
|
"'self'",
|
||||||
|
"data:",
|
||||||
|
"blob:",
|
||||||
|
"market-assets.strapi.io",
|
||||||
|
"192.168.0.211:9000",
|
||||||
|
"beyonder.synology.me:9000",
|
||||||
|
],
|
||||||
|
upgradeInsecureRequests: null,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"strapi::cors",
|
||||||
|
"strapi::poweredBy",
|
||||||
|
"strapi::query",
|
||||||
|
"strapi::body",
|
||||||
|
"strapi::session",
|
||||||
|
"strapi::favicon",
|
||||||
|
"strapi::public",
|
||||||
|
];
|
||||||
Reference in New Issue
Block a user