From 50b0ec83a90c1b4747ead929eae7465633cece30 Mon Sep 17 00:00:00 2001 From: Leandro Roberto Date: Wed, 6 Oct 2021 01:13:54 -0300 Subject: [PATCH] =?UTF-8?q?Ajuste=20de=20configura=C3=A7=C3=A3o=20sapl.con?= =?UTF-8?q?f=20com=20CORs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/config/nginx/sapl.conf | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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/;