diff --git a/changes/changelog.d/2149.misc b/changes/changelog.d/2149.misc new file mode 100644 index 000000000..342ad8a27 --- /dev/null +++ b/changes/changelog.d/2149.misc @@ -0,0 +1 @@ +Fix for banner images not being served on pods. diff --git a/deploy/nginx.template b/deploy/nginx.template index 214bc2ca4..c01c2eb05 100644 --- a/deploy/nginx.template +++ b/deploy/nginx.template @@ -132,6 +132,12 @@ server { add_header Access-Control-Allow-Origin '*'; } + # Allow direct access to only specific subdirectories in /media + location /media/dynamic_preferences/ { + alias ${MEDIA_ROOT}/dynamic_preferences/; + add_header Access-Control-Allow-Origin '*'; + } + # This is an internal location that is used to serve # media (uploaded) files once correct permission / authentication # has been checked on API side. diff --git a/docker/nginx/conf.dev b/docker/nginx/conf.dev index 29b48f2f2..b92f621d2 100644 --- a/docker/nginx/conf.dev +++ b/docker/nginx/conf.dev @@ -132,6 +132,12 @@ http { add_header Access-Control-Allow-Origin '*'; } + # Allow direct access to only specific subdirectories in /media + location /media/dynamic_preferences/ { + alias ${MEDIA_ROOT}/dynamic_preferences/; + add_header Access-Control-Allow-Origin '*'; + } + # This is an internal location that is used to serve # media (uploaded) files once correct permission / authentication # has been checked on API side. diff --git a/front/docker/funkwhale.conf.template b/front/docker/funkwhale.conf.template index 08e25c8be..de0b993ab 100644 --- a/front/docker/funkwhale.conf.template +++ b/front/docker/funkwhale.conf.template @@ -97,6 +97,12 @@ server { add_header Access-Control-Allow-Origin '*'; } + # Allow direct access to only specific subdirectories in /media + location /media/dynamic_preferences/ { + alias ${MEDIA_ROOT}/dynamic_preferences/; + add_header Access-Control-Allow-Origin '*'; + } + # This is an internal location that is used to serve # media (uploaded) files once correct permission / authentication # has been checked on API side.