-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Fixes #497 by adding support for an optional new env variable, S3_BUCKET_URL_BASE #499
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
Fixes #497 by adding support for an optional new env variable, S3_BUCKET_URL_BASE #499
Conversation
|
thanks for this! can you add a a description of this variable to the README? |
…le, S3_BUCKET_URL_BASE
b472855 to
072ece4
Compare
|
Sure thing... added a new section to the README and pushed it up... |
|
thanks! |
|
I see that when you set the const s3Bucket = process.env.S3_BUCKET_URL_BASE ||
`https://s3-${process.env.AWS_REGION}.amazonaws.com/${process.env.S3_BUCKET}/`;So maybe we should rename it to |
|
This just bit me in the form of a few hours wrestling with what i thought was AWS being stubborn about CORS... @catarak are you hosting with buckets that are using this variable, or do you think it's safe enough to change it to actually be a base rather than the full url? |
|
@dhoizner Sorry to see this conversation so long after it was started (somehow Github notifications aren't always reaching me)... I think @simonpfish is correct that better naming and documentation of the variable is needed. However, updating the code to always append it with the S3_BUCKET would break its use with custom CNAME mapped buckets. |
|
@francisli ah, good call! For now I added a bit to the README in #1475 |
Sorry the documentation wasn't clear!! Thank you for updating it. |
So, with these changes, you can support us-east-1 by just manually setting the S3_BUCKET_URL_BASE to https://s3.amazonaws.com/. Or, if you've got a CNAME mapped to your bucket, you can specify that instead.
Before your pull request is reviewed and merged, make sure you
npm run lintFixes #123Thank you!