Skip to content

Commit

Permalink
Merge pull request #23 from strapi-extensions/feature/add-docker-build
Browse files Browse the repository at this point in the history
feat: add middleware.
  • Loading branch information
wujun4code committed Jan 30, 2024
2 parents ac011a1 + 8372eca commit 658d47a
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions development/app/config/middlewares.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,40 @@ export default [
'strapi::session',
'strapi::favicon',
'strapi::public',
{
name: "strapi::security",
config: {
contentSecurityPolicy: {
useDefaults: true,
directives: {
"connect-src": ["'self'", "https:"],
"img-src": [
"'self'",
"data:",
"blob:",
"dl.airtable.com",
"https://market-assets.strapi.io",
/**
* Note: If using a STORAGE_URL replace `https://${process.env.STORAGE_ACCOUNT}.blob.core.windows.net` w/ process.env.STORAGE_URL
* If using a CDN URL make sure to include that url in the CSP headers process.env.STORAGE_CDN_URL
*/
`https://${process.env.STORAGE_ACCOUNT}.blob.core.windows.net`,
],
"media-src": [
"'self'",
"data:",
"blob:",
"dl.airtable.com",
/**
* Note: If using a STORAGE_URL replace `https://${process.env.STORAGE_ACCOUNT}.blob.core.windows.net` w/ process.env.STORAGE_URL
* If using a CDN URL make sure to include that url in the CSP headers process.env.STORAGE_CDN_URL
*/
`https://${process.env.STORAGE_ACCOUNT}.blob.core.windows.net`,

],
upgradeInsecureRequests: null,
},
},
},
},
];

0 comments on commit 658d47a

Please sign in to comment.