Skip to content
This repository has been archived by the owner on Jun 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #20 from ExEr7um/dev
Browse files Browse the repository at this point in the history
Хост изображений на Cloudinary
  • Loading branch information
ExEr7um authored Mar 19, 2022
2 parents 48d87a0 + a723f8c commit a49d7f6
Show file tree
Hide file tree
Showing 4 changed files with 949 additions and 14 deletions.
33 changes: 23 additions & 10 deletions config/middlewares.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
module.exports = [
'strapi::errors',
'strapi::security',
'strapi::cors',
'strapi::poweredBy',
'strapi::logger',
'strapi::query',
'strapi::body',
'strapi::session',
'strapi::favicon',
'strapi::public',
"strapi::errors",
{
name: "strapi::security",
config: {
contentSecurityPolicy: {
useDefaults: true,
directives: {
"connect-src": ["'self'", "https:"],
"img-src": ["'self'", "data:", "blob:", "res.cloudinary.com"],
"media-src": ["'self'", "data:", "blob:", "res.cloudinary.com"],
upgradeInsecureRequests: null,
},
},
},
},
"strapi::cors",
"strapi::poweredBy",
"strapi::logger",
"strapi::query",
"strapi::body",
"strapi::session",
"strapi::favicon",
"strapi::public",
];
15 changes: 14 additions & 1 deletion config/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,18 @@ module.exports = ({ env }) => ({
},
},
},
// ...
upload: {
config: {
provider: "cloudinary",
providerOptions: {
cloud_name: env("CLOUDINARY_NAME"),
api_key: env("CLOUDINARY_KEY"),
api_secret: env("CLOUDINARY_SECRET"),
},
actionOptions: {
upload: {},
delete: {},
},
},
},
});
Loading

0 comments on commit a49d7f6

Please sign in to comment.