Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS provider improvements #60

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ivictbor
Copy link

  1. Add previewBaseUrl, which allows overriding hardcoded 'https://${bucket}.s3.amazonaws.com' why:
    This allows specifying URL for buckets served via CDN and static website hosting, example of such hosting https://support.cloudflare.com/hc/en-us/articles/360037983412-Configuring-an-Amazon-Web-Services-static-site-to-use-Cloudflare
    For example, if my S3 bucket is named static.example.com then I will not be able to get it's public files (with public-read ACL) using https://${bucket}.s3.amazonaws.com/myfile.png -> https://static.example.com.s3.amazonaws.com/myfile.png, because buckets with dot's not covered by AWS SSL certificate. To fix this you might also want to use https://s3.${region}.amazonaws.com/${bucket}/myfile.png - here we use a standard domain, which has a good certificate, I would recommend using this endpoint because this is more universal (I did not perform this in pull request because probably you also other reasons, and my current option is backward compatible for all existing installations)
    But ideally, me and other users who are serving S3 buckets via CDN, need the ability to load images from https://static.example.com/myfile.png (it preaches images on CDN and makes URLs more similar to those which we use in prod

  2. I added Content-Type Metadata to s3 which is useful in multiple cases. For example, when you upload SVGs, S3 sets System Content-Type application/octet-stream which brakes disposition and is subject to CORB

ivictbor and others added 2 commits March 13, 2023 13:25
* Allows to override 'https://${bucket}.s3.amazonaws.com' for previews in admin
   * mihgt be usefull for buckets served via CDN and static website hosting, e.g. https://support.cloudflare.com/hc/en-us/articles/360037983412-Configuring-an-Amazon-Web-Services-static-site-to-use-Cloudflare
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant