diff --git a/config/middlewares.js b/config/middlewares.js index 0569698..5612307 100644 --- a/config/middlewares.js +++ b/config/middlewares.js @@ -1,13 +1,7 @@ +// ~/strapi-aws-s3/backend/config/middlewares.js + module.exports = [ - "strapi::errors", - "strapi::cors", - "strapi::poweredBy", - "strapi::logger", - "strapi::query", - "strapi::body", - "strapi::session", - "strapi::favicon", - "strapi::public", + 'strapi::errors', { name: 'strapi::security', config: { @@ -19,14 +13,14 @@ module.exports = [ "'self'", 'data:', 'blob:', - 'market-assets.strapi.io', + 'dl.airtable.com', 'saf-site.s3.us-east-1.amazonaws.com', ], 'media-src': [ "'self'", 'data:', 'blob:', - 'market-assets.strapi.io', + 'dl.airtable.com', 'saf-site.s3.us-east-1.amazonaws.com', ], upgradeInsecureRequests: null, @@ -34,4 +28,12 @@ module.exports = [ }, }, }, -]; + 'strapi::cors', + 'strapi::poweredBy', + 'strapi::logger', + 'strapi::query', + 'strapi::body', + 'strapi::session', + 'strapi::favicon', + 'strapi::public', +]; \ No newline at end of file diff --git a/config/plugins.js b/config/plugins.js index d8d2930..a5ca651 100644 --- a/config/plugins.js +++ b/config/plugins.js @@ -8,17 +8,13 @@ module.exports = ({ env }) => ({ config: { provider: 'aws-s3', providerOptions: { - baseUrl: env('CDN_URL'), - rootPath: env('CDN_ROOT_PATH'), - s3Options: { - accessKeyId: env('AWS_ACCESS_KEY_ID'), - secretAccessKey: env('AWS_ACCESS_SECRET'), - region: env('AWS_REGION'), - params: { - ACL: env('AWS_ACL', 'public-read'), - signedUrlExpires: env('AWS_SIGNED_URL_EXPIRES', 15 * 60), - Bucket: env('AWS_BUCKET'), - }, + accessKeyId: env('AWS_ACCESS_KEY_ID'), + secretAccessKey: env('AWS_ACCESS_SECRET'), + region: env('AWS_REGION'), + params: { + ACL: env('AWS_ACL', 'public-read'), + signedUrlExpires: env('AWS_SIGNED_URL_EXPIRES', 15 * 60), + Bucket: env('AWS_BUCKET'), }, }, actionOptions: {