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

Assumes any url with s3 in it is an s3 bucket #18

Open
gehan opened this issue Apr 30, 2020 · 1 comment
Open

Assumes any url with s3 in it is an s3 bucket #18

gehan opened this issue Apr 30, 2020 · 1 comment

Comments

@gehan
Copy link

gehan commented Apr 30, 2020

Currently if an origin domain contains s3 in it anywhere then it assumes it's an s3 bucket and changes the url to ${bucketName}.s3.amazonaws.com

https://github.com/serverless-components/aws-cloudfront/blob/master/lib/getOriginConfig.js#L18

There should be a more in-depth check for this - at the last adding some dots in there like .s3. or something like that.

I'm actually trying to use an s3 redirect bucket like this http://{bucketName}.s3-website-eu-west-1.amazonaws.com so it's causing an issues as the redirect only works from s3-website-eu-west-1 urls not s3.amazonaws.com so had to fork and alter this.

@gehan gehan changed the title Incorrectly assumes any url with s3 in it is an s3 bucket Assumes any url with s3 in it is an s3 bucket Apr 30, 2020
@gehan
Copy link
Author

gehan commented May 1, 2020

I did a PR for this - #19

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

No branches or pull requests

1 participant