diff --git a/docker/config/nginx/sapl.conf b/docker/config/nginx/sapl.conf index 28c2cb984..bd69c1141 100644 --- a/docker/config/nginx/sapl.conf +++ b/docker/config/nginx/sapl.conf @@ -13,6 +13,11 @@ server { location /api/ { add_header 'Access-Control-Allow-Origin' '*'; + + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $http_host; + proxy_redirect off; + proxy_pass http://sapl_server; } location /static/ { @@ -25,17 +30,12 @@ server { location / { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $http_host; - proxy_redirect off; - - if (!-f $request_filename) { - proxy_pass http://sapl_server; - break; - } + proxy_pass http://sapl_server; } + error_page 500 502 503 504 /500.html; location = /500.html { root /var/interlegis/sapl/sapl/static/;