Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Fix nginx redirect for no trailing slash (#2848)
sarayourfriend0cb72d30254f
diff --git a/api/nginx.conf.template b/api/nginx.conf.templateindex bd70cb56d..44bbc131a 100644--- a/api/nginx.conf.template+++ b/api/nginx.conf.template@@ -47,13 +47,10 @@ server {charset utf-8;client_max_body_size 75M;error_page 500 /500.json;+ absolute_redirect off;- location /static {- alias /app/static;- }-- location /media {- alias /app/media;+ location /static/ {+ alias /app/static/;}location / {diff --git a/docker-compose.yml b/docker-compose.ymlindex 9c60635c8..a3110f844 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -290,6 +290,22 @@ services:stdin_open: truetty: true+ nginx:+ profiles:+ - api+ build:+ context: ./api/+ target: nginx+ args: # Automatically inferred from env vars, unless specified+ - SEMANTIC_VERSION=${SEMANTIC_VERSION:-v1.0.0}+ - API_PY_VERSION+ ports:+ - "50270:8080"+ environment:+ DJANGO_NGINX_UPSTREAM_URL: web:8000+ depends_on:+ - web+proxy:profiles:- api