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

Export the AWS_S3_ADDRESSING_STYLE setting #248

Merged
merged 1 commit into from
Mar 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions lpld/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,22 @@
if "AWS_S3_ENDPOINT_URL" in os.environ:
AWS_S3_ENDPOINT_URL = os.environ["AWS_S3_ENDPOINT_URL"]

# Specify the addressing style for the bucket.
#
# Possible values are:
# "virtual" - Bucket name is included in the hostname.
# "path" - Bucket name is included in the URI name.
# By default, Boto3 will attempt to use "virtual" and fallback to "path".
# See also: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html#using-a-configuration-file # noqa: E501
#
# There is an oddity when you specify `AWS_S3_ENDPOINT_URL`. When the addressing
# style is manually set to "virtual", then the bucket name is injected as the first
# part of the endpoint host, with after the `//`. So, when combining "virtual"
# addressing style and the `AWS_S3_ENDPOINT_URL` setting, don't include the bucket
# name in the `AWS_S3_ENDPOINT_URL`.
if "AWS_S3_ADDRESSING_STYLE" in os.environ:
AWS_S3_ADDRESSING_STYLE = os.environ["AWS_S3_ADDRESSING_STYLE"]


# SECURITY

Expand Down
Loading