Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit restores the Django AWS_S3_CUSTOM_DOMAIN setting which was incorrectly removed in commit 853c948. Without this setting, S3 URLs are constructed like: https://s3.amazonaws.com/files.consumerfinance.gov/something where we want them to be instead constructed like: https://files.consumerfinance.gov/something This fix makes that happen. To test this, you can run this command at the command line: > S3_ENABLED=True AWS_STORAGE_BUCKET_NAME=files.consumerfinance.gov AWS_ACCESS_KEY_ID=x AWS_SECRET_ACCESS_KEY=x AWS_S3_CUSTOM_DOMAIN=files.consumerfinance.gov cfgov/manage.py shell -c "from wagtail.documents import get_document_model; Document = get_document_model(); print(Document.objects.last().file.url)" This prints out the URL of the most recent Wagtail document; on the main branch this will use the incorrect URL structure. With this commit the URL will be https://files.cf.gov as desired. Addresses internal D&CP#325.
- Loading branch information