Make API work in single docker context (#1098)

This commit is contained in:
Leendert de Borst
2025-08-06 18:30:16 +02:00
committed by Leendert de Borst
parent 8bb6ec2b7c
commit ff90cc2937

View File

@@ -74,8 +74,8 @@ http {
add_header Content-Security-Policy "frame-ancestors 'self'" always;
# Admin interface
location /admin {
proxy_pass http://admin;
location /admin/ {
proxy_pass http://admin/;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto https;
@@ -91,15 +91,23 @@ http {
proxy_set_header Connection "upgrade";
proxy_read_timeout 86400;
}
location /admin {
return 301 $scheme://$host/admin/;
}
# API endpoints
location /api {
proxy_pass http://api;
location /api/ {
proxy_pass http://api/;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /api {
return 301 $scheme://$host/api/;
}
# Client app (root path)
location / {