Skip to content
Snippets Groups Projects
Commit 26b9aa82 authored by Thomas Schneider's avatar Thomas Schneider
Browse files

Merge branch 'th/webserver-proxy-variables' into 'master'

webserver: Allow configuring proxy_pass scheme and proxy_set_header Host

See merge request !9
parents 8b50fbfd 1490edae
No related branches found
No related tags found
2 merge requests!12Remove scip/zimpl binaries from shared repository,!9webserver: Allow configuring proxy_pass scheme and proxy_set_header Host
Pipeline #2810 passed
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
proxy_set_header X-Remote-Groups $sso_groups; proxy_set_header X-Remote-Groups $sso_groups;
{% endif %} {% endif %}
{% if location.proxy_host is defined %} {% if location.proxy_host is defined %}
proxy_pass https://{{location.proxy_host}}{% if not location.proxy_relative|default(false) %}/{% endif %}; proxy_pass {{location.proxy_scheme|default("https")}}://{{location.proxy_host}}{% if not location.proxy_relative|default(false) %}/{% endif %};
{% elif location.proxy_port is defined %} {% elif location.proxy_port is defined %}
proxy_pass http://127.0.0.1:{{location.proxy_port}}{% if not location.proxy_relative|default(false) %}/{% endif %}; proxy_pass http://127.0.0.1:{{location.proxy_port}}{% if not location.proxy_relative|default(false) %}/{% endif %};
{% elif server.port is defined %} {% elif server.port is defined %}
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
{% else %} {% else %}
proxy_pass http://unix:{{server.socket|default('/run/nginx/' ~ server.server_name ~ '.sock')}}{% if not location.proxy_relative|default(false) %}:/{% endif %}; proxy_pass http://unix:{{server.socket|default('/run/nginx/' ~ server.server_name ~ '.sock')}}{% if not location.proxy_relative|default(false) %}:/{% endif %};
{% endif %} {% endif %}
proxy_set_header Host {{server.server_name}}; proxy_set_header Host {{location.proxy_set_host|default(server.server_name)}};
{% if server.forward_http|default(true) %} {% if server.forward_http|default(true) %}
proxy_set_header X-Forwarded-Proto https; proxy_set_header X-Forwarded-Proto https;
{% else %} {% else %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment