Skip to content

Commit

Permalink
dependency: install Cloudinary integration
Browse files Browse the repository at this point in the history
Expanded the .env.example file to match current needs
  • Loading branch information
ediazjz committed Jun 18, 2022
1 parent b8fcdb3 commit 3bf179b
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
HOST=0.0.0.0
PORT=1337
APP_KEYS=
API_TOKEN_SALT=
ADMIN_JWT_SECRET=
JWT_SECRET=

CLOUDINARY_NAME=
CLOUDINARY_KEY=
CLOUDINARY_SECRET=
14 changes: 14 additions & 0 deletions config/middlewares.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,18 @@ module.exports = [
'strapi::session',
'strapi::favicon',
'strapi::public',
{
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,
},
},
},
},
];
16 changes: 16 additions & 0 deletions config/plugins.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
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: {},
},
},
},
});
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"@strapi/plugin-graphql": "^4.2.0",
"@strapi/plugin-i18n": "4.2.0",
"@strapi/plugin-users-permissions": "4.2.0",
"@strapi/provider-upload-cloudinary": "^4.2.0",
"@strapi/strapi": "4.2.0",
"better-sqlite3": "7.4.6"
},
Expand Down

0 comments on commit 3bf179b

Please sign in to comment.