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

Settings adjustment for PDF downloads #2613

Merged
merged 1 commit into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion backend/audit/file_downloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def file_exists(filename):
region_name=settings.AWS_S3_PRIVATE_REGION_NAME,
aws_access_key_id=settings.AWS_PRIVATE_ACCESS_KEY_ID,
aws_secret_access_key=settings.AWS_PRIVATE_SECRET_ACCESS_KEY,
endpoint_url=settings.AWS_S3_PRIVATE_ENDPOINT,
endpoint_url=settings.AWS_S3_PRIVATE_INTERNAL_ENDPOINT,
config=Config(signature_version="s3v4"),
)

Expand Down
6 changes: 6 additions & 0 deletions backend/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,9 @@
)

AWS_S3_ENDPOINT_URL = AWS_S3_PRIVATE_ENDPOINT

# when running locally, the internal endpoint (docker network) is different from the external endpoint (host network)
AWS_S3_PRIVATE_INTERNAL_ENDPOINT = AWS_S3_ENDPOINT_URL
AWS_S3_PRIVATE_EXTERNAL_ENDPOINT = "http://localhost:9001"

DISABLE_AUTH = env.bool("DISABLE_AUTH", default=False)
Expand Down Expand Up @@ -309,6 +312,9 @@

AWS_S3_PRIVATE_ENDPOINT = s3_creds["endpoint"]
AWS_S3_ENDPOINT_URL = f"https://{AWS_S3_PRIVATE_ENDPOINT}"

# in deployed environments, the internal & external endpoint URLs are the same
AWS_S3_PRIVATE_INTERNAL_ENDPOINT = AWS_S3_ENDPOINT_URL
AWS_S3_PRIVATE_EXTERNAL_ENDPOINT = AWS_S3_ENDPOINT_URL

AWS_PRIVATE_LOCATION = "static"
Expand Down