New Docker container nginx tweaks
When a user has the following settings in their .env
file:
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_STORAGE_BUCKET_NAME
We should automatically change the Nginx file in the Docker container so that content can load correctly. Otherwise users need to load their own custom Nginx files.
# location /_protected/media/ {
# this is an internal location that is used to serve
# audio files once correct permission / authentication
# has been checked on API side
# internal;
# alias ${MEDIA_ROOT};
# }
# Comment the previous location and uncomment this one if you're storing
# media files in a S3 bucket
location ~ /_protected/media/(.+) {
internal;
# Needed to ensure DSub auth isn't forwarded to S3/Minio, see #932
proxy_set_header Authorization "";
proxy_pass $1;
}