Fix the nginx headers, again.

This commit is contained in:
Andrea Dell'Amico 2022-04-29 19:00:07 +02:00
parent 1ac62259a6
commit 13102924a5
Signed by: andrea.dellamico
GPG Key ID: 147ABE6CEB9E20FF
2 changed files with 7 additions and 6 deletions

View File

@ -65,15 +65,18 @@ server {
}
location @backend {
proxy_http_version 1.1;
proxy_redirect http://{{ inception_project_server_endpoint }}/ /;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Connection ""; # Clear for keepalive
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Original-URI $request_uri;
proxy_max_temp_file_size 0;
proxy_connect_timeout 180;
proxy_send_timeout 180;
proxy_read_timeout 180;
proxy_temp_file_write_size 64k;
proxy_set_header Authorization "Bearer $auth_token";
proxy_set_header remote_user "$remote_user_js";
proxy_pass http://_inception-server;

View File

@ -21,7 +21,5 @@ wicket.core.csrf.no-origin-action=allow
wicket.core.csrf.conflicting-origin-action=allow
{% endif %}
{% if inception_project_server_behind_reverse_proxy %}
# server.tomcat.internal-proxies=127\.0\.[0-1]\.1
server.forward-headers-strategy=NATIVE
server.tomcat.accesslog.request-attributes-enabled=true
{% endif %}