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

Make S3 endpoint configurable #270

Merged
merged 1 commit into from
Aug 26, 2019
Merged

Make S3 endpoint configurable #270

merged 1 commit into from
Aug 26, 2019

Conversation

withsmilo
Copy link

@@ -41,6 +41,9 @@ function populateS3Options(env): Object {
// trim off trailing slashes
.replace(/\/+$/, "");

const s3Endpoint =
env.COMMUTER_S3_ENDPOINT || "";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it valid to provide an empty string as the default value in this case? Assuming it won't error when consumed by any APIs....

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@captainsafia , thanks for reviewing my PR.
If we set config.endpoint as "" or null or 0, the aws-sdk-js will set proper endpoint automatically.
https://github.com/aws/aws-sdk-js/blob/b142e6c92bac747df4d65e4befc9960bbf15e0d4/lib/service.js#L53-L56
However, I'm sorry that I tested this PR with my customized s3 only, not AWS. Would you please test this using AWS?

@captainsafia captainsafia merged commit 6f36515 into nteract:master Aug 26, 2019
@withsmilo withsmilo deleted the add_endpoint_option branch August 26, 2019 04:40
@withsmilo
Copy link
Author

@captainsafia Thanks for merging!

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.

2 participants