{"_id":"strapi-provider-aws-s3-cloudfront-cdn","_rev":"2-a51df9e614bdfc12d533bc2b83960e81","name":"strapi-provider-aws-s3-cloudfront-cdn","dist-tags":{"latest":"1.0.8"},"versions":{"1.0.6":{"name":"strapi-provider-aws-s3-cloudfront-cdn","version":"1.0.6","description":"AWS S3 provider for Strapi upload with Cloudfront CDN","keywords":["upload","aws","s3","strapi","cloudfront"],"homepage":"https://github.com/orvad/strapi-provider-aws-s3-cloudfront-cdn","bugs":{"url":"https://github.com/orvad/strapi-provider-aws-s3-cloudfront-cdn/issues"},"repository":{"type":"git","url":"git+https://github.com/orvad/strapi-provider-aws-s3-cloudfront-cdn.git"},"license":"MIT","author":{"name":"Martin Orvad","email":"martin@metalab.dk","url":"https://metalab.dk"},"maintainers":[{"name":"martin_orvad","email":"martin@metalab.dk"}],"main":"lib/index.js","directories":{"lib":"./lib"},"scripts":{"test":"echo \"no tests yet\""},"dependencies":{"aws-sdk":"2.892.0","lodash":"4.17.21"},"peerDependencies":{"@strapi/strapi":"^4.0.0"},"engines":{"node":">=14.19.1 <=16.x.x","npm":">=6.0.0"},"gitHead":"a4d1d4dca8e2448bf692dac00cee85dbdfb0f9b6","_id":"strapi-provider-aws-s3-cloudfront-cdn@1.0.6","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-4cnf00IibRL7Y/oXRAgagXAT0vEcd/9dQX/B28+/9ufrJjXVDwLzU9JPC+vKrb7x1p0/ZZnXx0xX+EMJzeiwNw==","shasum":"f826209a7d7a4cf82c84a0609e7fdae2099a4488","tarball":"https://registry.npmjs.org/strapi-provider-aws-s3-cloudfront-cdn/-/strapi-provider-aws-s3-cloudfront-cdn-1.0.6.tgz","fileCount":4,"unpackedSize":7126,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDrGtUDfNUDQvRZhGbFVVuXe5mjeGTOUCbLd6fANMtA8wIhANsrmbS9ZD26ZoLGPiqaQqCzDPo5a22uHNYfg/9GgyE9"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJitz5JACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmow3w/9HkPH7MnpL5YbIbYnQmhNT5JargY4zzdNmeO6gihJKrp+oPQM\r\n6FSlcutbu28yDcHYFfy/fJW6hmO/dGPWw69QU7dxIRGWGnyCKSZ6eRLz6+aL\r\nELBQDveKn7HvTxOUXdocTC7mH/pXcDVzcRVyRTz50BvA4+A12gi3o6Vndy9h\r\nFf4UoPL0VPiwWW9quLDbGNNIrZcVbIcMBCbVwQOBGyNvfQ3tzS/BhpvCkLis\r\nYZZGDgiIsHSxvsa7uLyvIykGB1vMIFBOgrwFA1ioUhQXsQQv8xtSa5xf8Tgh\r\ndE1xKMxkBOAOB4x2eRZLV3uj0qw1ueXC2DhZ2fA0lgyfo3lMLIJoBc1I2nfH\r\n1HPPHM2jsmON4yaxjcOwLtzVSD7/Q/gaElZ1+55R9wdhkQaIlxJzhWcr1cMF\r\nsHRSU1SrbPvjaPFCh5l7IIyZBUITaKJFiP5SU/9OHo6ohHhsS7E3ZbtGSSNL\r\nE27LPIgIR+M4ZyIZ654h4chfpr+FUmjc6Ovn2YcZCeBvX3Lav/Pu0XLsf25X\r\nlIC7DIS9Oa3Ac+I/Yonsk8hi+asDIHodSm96zFoHbsGVJRWPAuwl0/u8tAAl\r\nM8zMdWPdmV5SAd9zTHV6KbY3rzvm33T/U2WuTbXrAMi5kptBDtK2WUxC2LGi\r\nLh6ucCPz7na9POcznYV161JGFjDxCDkhckc=\r\n=YV+0\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"martin_orvad","email":"martin@metalab.dk"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/strapi-provider-aws-s3-cloudfront-cdn_1.0.6_1656176200964_0.09997252165651682"},"_hasShrinkwrap":false},"1.0.7":{"name":"strapi-provider-aws-s3-cloudfront-cdn","version":"1.0.7","description":"AWS S3 provider for Strapi upload with Cloudfront CDN","keywords":["upload","aws","s3","strapi","cloudfront"],"homepage":"https://github.com/orvad/strapi-provider-aws-s3-cloudfront-cdn","bugs":{"url":"https://github.com/orvad/strapi-provider-aws-s3-cloudfront-cdn/issues"},"repository":{"type":"git","url":"git+https://github.com/orvad/strapi-provider-aws-s3-cloudfront-cdn.git"},"license":"MIT","author":{"name":"Martin Orvad","email":"martin@metalab.dk","url":"https://metalab.dk"},"maintainers":[{"name":"martin_orvad","email":"martin@metalab.dk"}],"main":"lib/index.js","directories":{"lib":"./lib"},"scripts":{"test":"echo \"no tests yet\""},"dependencies":{"aws-sdk":"2.892.0","lodash":"4.17.21"},"peerDependencies":{"@strapi/strapi":"^4.0.0"},"engines":{"node":">=14.19.1 <=16.x.x","npm":">=6.0.0"},"gitHead":"32e219c40c7134bb024096d8a03f176811cadf7b","_id":"strapi-provider-aws-s3-cloudfront-cdn@1.0.7","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-2XPlbQUf0KlmIvLWDw1CXNdp5znEZxUdIVFjIi6vXddEwz3WI5sGSoDLadUYEO6ATJHBGCMu1QSAmytvlpi2hA==","shasum":"5ba9ce35b3188babf4718f5d855bffdaa2ce90f9","tarball":"https://registry.npmjs.org/strapi-provider-aws-s3-cloudfront-cdn/-/strapi-provider-aws-s3-cloudfront-cdn-1.0.7.tgz","fileCount":4,"unpackedSize":7156,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCXMZkwpDHpPyTmTnNrCm5wHhZTnYe+NaZ0njF6AhsZuQIgEHUUp3ZmNbPqVHp/R78nW4zB31I1G4lL2Jtb6hHDGT8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJit0FgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp+DA//SkeRyEKevCCfnmrq0z3HLgguqnso0+TwasQ2jtBPSDqF4kcb\r\ne93bK3qNtKL49ttkbAlKcmtd0GBuL6j+/az+Fp6fHHboxakQj+A6aAAmqyEH\r\nQVgA/cILiShhrOFvQdXhUF/FH+8XiOHsu6blqg9lnB+cPbN69dlRIX0Eh45w\r\nn54Aprt2IkFEDQQgoaZUgg8/2lNltRPGqMjrq11IY+/9VXqXznSU9fehxSa1\r\nnt2YP95lVo+nhJ5VlupnCLu6AZ6lpXHS7xxvDCIIRaqGxe+543gDDp/Tg7l/\r\nUT4vT1eEqh8U/e7UpyTX94+7djImIdBV8mrGVjFrhAwnvbo8+VJfsWKb6N3O\r\nUJ+I8nBfHdekWkexn/uIw0t6dV2Tg6siknRgQZmIo0684duZTTwQ42Ra6D1s\r\nyCpudB93zUWpgFl/73YE2VB8k509vd5r6XmrkVxRJ3bK2vHYtZ6n9nZPoZ3m\r\nOHmHBLITtVdJA2nu6E95bmlaNb1tEM5qk8LGF11Z3xnW7RLbOOrXKES7MkIF\r\n0Gf4IlDLRoWUIbXHKmucW5NVLjl7fCyNR6iUONSRY5y5D+QGLnLnwEQRWqe3\r\nu3/wQYHVvJ5NFirH1POLSHxAnPtDj5zzZsr3kBJUhpmusl4+S0CCU/LXt6Uz\r\nCfn0tHUBhtWhA0ys/4YbThOtC9OFEM0UciE=\r\n=nFTH\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"martin_orvad","email":"martin@metalab.dk"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/strapi-provider-aws-s3-cloudfront-cdn_1.0.7_1656176992192_0.9859456801843456"},"_hasShrinkwrap":false},"1.0.8":{"name":"strapi-provider-aws-s3-cloudfront-cdn","version":"1.0.8","description":"AWS S3 provider for Strapi upload with Cloudfront CDN","keywords":["upload","aws","s3","strapi","cloudfront"],"homepage":"https://github.com/orvad/strapi-provider-aws-s3-cloudfront-cdn","bugs":{"url":"https://github.com/orvad/strapi-provider-aws-s3-cloudfront-cdn/issues"},"repository":{"type":"git","url":"git+https://github.com/orvad/strapi-provider-aws-s3-cloudfront-cdn.git"},"license":"MIT","author":{"name":"Martin Orvad","email":"martin@metalab.dk","url":"https://metalab.dk"},"maintainers":[{"name":"martin_orvad","email":"martin@metalab.dk"}],"main":"lib/index.js","directories":{"lib":"./lib"},"scripts":{"test":"echo \"no tests yet\""},"dependencies":{"aws-sdk":"2.892.0","lodash":"4.17.21"},"peerDependencies":{"@strapi/strapi":"^4.0.0"},"engines":{"node":">=14.19.1 <=16.x.x","npm":">=6.0.0"},"gitHead":"2479a873204ec61dd604e90dff2e6916ce02a59a","_id":"strapi-provider-aws-s3-cloudfront-cdn@1.0.8","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-TGxKsNYYXNlEhyAGUgyM+XbJl+3bj3fk+60cu6oSJLlIkYauXLV4HHNzBLxeXXj285wLfgy2BqVgPkT+/b33eA==","shasum":"cf471525414a9ea1e3be9eb4b9d607fe7a70e51e","tarball":"https://registry.npmjs.org/strapi-provider-aws-s3-cloudfront-cdn/-/strapi-provider-aws-s3-cloudfront-cdn-1.0.8.tgz","fileCount":4,"unpackedSize":7469,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFlp8MYTeIsY3AuxLwx+BAE2fb8gYsN+Llxy7a2tsZCdAiEA+Oa9TQojIv3mYDx5zXSHTP3nt8cVRD3BBfV+/fqY0U0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJit0xbACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmppvxAAnPdP11CxuiL+2XNnsv5ZHzqZSjxbXkAUpnfBsu2U3ihktI7v\r\nCRpUonq8TZClddu9Lrg8/udfDFRbkeRaNnuSYqmxRU69J6yY9w5GR3fFoFPz\r\nUsH9xED9aMXukgPtPRxgh5R7CP1L7ZrmVkfoevhrWp9T+eYs2KhXLD/M721l\r\nUqDbUMA9a14KjSzf03xPMQzBCbVZ2pYKiPCFbGsVcGZ72nOWvw/KAxKsG71K\r\nShPcLeABCC57M0rqIzy4tetLgEBZfm94JZ6ERyjI+OXtd8Lf3QsllWL89w5z\r\ng6SdT23UNuDoCZ69H3MEoIizxcF0ntZTkbo4J7kukrK3PC6kiSjE+V4kHOlN\r\nGX+hLtg+prysuYkGBSH3QBaxcUjVBJm123ODw+qoxgyr8xt9bgIJhWbhenG7\r\nEiDYv2ccNHT8VEEy/1vGz2rJVt3kzIKuA31+8e0mcyNenvuEjWtJwCRC341H\r\ncnNdhNSloZjrjYwWUViHTNu4qp4CutL+UvSwwZJx+ojxoxcEA70zBDAGCn8q\r\nJR0yOgdjRc6DcNixkte55PImiB5RwCpSLzI8LDvu7mGFnZ7TXGjGyEpT7UZq\r\nhmfzdi6TWKyNOGEL61S7jOQKK+dEEqextTl+CvilpVeRzZT0jbiOlSzKpH1w\r\neIsP3GPNy76n4i9Wy95zta+TDaj6ub6Szmc=\r\n=lUJB\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"martin_orvad","email":"martin@metalab.dk"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/strapi-provider-aws-s3-cloudfront-cdn_1.0.8_1656179802871_0.9328384828029617"},"_hasShrinkwrap":false}},"time":{"created":"2022-06-25T16:56:40.964Z","1.0.6":"2022-06-25T16:56:41.144Z","modified":"2022-06-25T17:56:43.132Z","1.0.7":"2022-06-25T17:09:52.351Z","1.0.8":"2022-06-25T17:56:43.067Z"},"maintainers":[{"name":"martin_orvad","email":"martin@metalab.dk"}],"description":"AWS S3 provider for Strapi upload with Cloudfront CDN","homepage":"https://github.com/orvad/strapi-provider-aws-s3-cloudfront-cdn","keywords":["upload","aws","s3","strapi","cloudfront"],"repository":{"type":"git","url":"git+https://github.com/orvad/strapi-provider-aws-s3-cloudfront-cdn.git"},"author":{"name":"Martin Orvad","email":"martin@metalab.dk","url":"https://metalab.dk"},"bugs":{"url":"https://github.com/orvad/strapi-provider-aws-s3-cloudfront-cdn/issues"},"license":"MIT","readme":"# strapi-provider-aws-s3-cloudfront-cdn\n\nSo this is a \"scratch your own itch\" kinda package. It is an \"AWS S3 with Cloudfront\" upload provider for the wonderful [Strapi Open Source Node.js Headless CMS](https://strapi.io/) v4. This package exists simply because the official provider package does not currently support serving S3 assets via Cloufront CDN.\n\nIt is a copy of [this package](https://github.com/strapi/strapi/tree/master/packages/providers/upload-aws-s3) with the (tiny) Cloudfront addition. The text below is also mostly copied from Strapi's official provider plugin. If you need help setting it up, check the official documentation first :-)\n\nPlease refer to this Strapi official [README](https://github.com/strapi/strapi/blob/master/packages/providers/upload-aws-s3/README.md) for details.\n\n## Installation\n\n```bash\n# using yarn\nyarn add strapi-provider-aws-s3-cloudfront-cdn\n\n# using npm\nnpm install strapi-provider-aws-s3-cloudfront-cdn --save\n```\n\n### Provider Configuration\n\n`./config/plugins.js`:\n\n```js\nmodule.exports = ({ env }) => ({\n  // ...\n  upload: {\n    config: {\n      provider: \"strapi-provider-aws-s3-cloudfront-cdn\",\n      providerOptions: {\n        accessKeyId: env(\"AWS_ACCESS_KEY_ID\"),\n        secretAccessKey: env(\"AWS_ACCESS_SECRET\"),\n        region: env(\"AWS_REGION\"),\n        params: {\n          Bucket: env(\"AWS_BUCKET\"),\n        },\n        cdn: env(\"AWS_CLOUDFRONT_URL\"), // eg. https://xyz.cloudfront.net (no trailing slash)\n      },\n      actionOptions: {\n        upload: {},\n        uploadStream: {},\n        delete: {},\n      },\n    },\n  },\n  // ...\n});\n```\n\n### Security Middleware Configuration\n\nDue to the default settings in the Strapi Security Middleware you will need to modify the `contentSecurityPolicy` settings to properly see thumbnail previews in the Media Library. You should replace `strapi::security` string with the object bellow instead as explained in the [middleware configuration](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.html#loading-order) documentation.\n\n`./config/middlewares.js`\n\n```js\nmodule.exports = [\n  // ...\n  {\n    name: \"strapi::security\",\n    config: {\n      contentSecurityPolicy: {\n        useDefaults: true,\n        directives: {\n          \"connect-src\": [\"'self'\", \"https:\"],\n          \"img-src\": [\n            \"'self'\",\n            \"data:\",\n            \"blob:\",\n            \"dl.airtable.com\",\n            \"yourBucketName.s3.yourRegion.amazonaws.com\",\n            \"yourCloudfrontDomain\", // eg. xyz.cloudfront.net\n          ],\n          \"media-src\": [\n            \"'self'\",\n            \"data:\",\n            \"blob:\",\n            \"dl.airtable.com\",\n            \"yourBucketName.s3.yourRegion.amazonaws.com\",\n            \"yourCloudfrontDomain\", // eg. xyz.cloudfront.net\n          ],\n          upgradeInsecureRequests: null,\n        },\n      },\n    },\n  },\n  // ...\n];\n```\n\nIf you use dots in your bucket name, the url of the ressource is in directory style (`s3.yourRegion.amazonaws.com/your.bucket.name/image.jpg`) instead of `yourBucketName.s3.yourRegion.amazonaws.com/image.jpg`. Then only add `s3.yourRegion.amazonaws.com` to img-src and media-src directives.\n\n## Required AWS Policy Actions\n\nThese are the minimum amount of permissions needed for this provider to work.\n\n```json\n\"Action\": [\n  \"s3:PutObject\",\n  \"s3:GetObject\",\n  \"s3:ListBucket\",\n  \"s3:DeleteObject\",\n  \"s3:PutObjectAcl\"\n],\n```\n","readmeFilename":"README.md"}