26 lines
888 B
Plaintext
26 lines
888 B
Plaintext
{% if USE_REVERSE_PROXY == "yes" %}
|
|
{% for k, v in all.items() %}
|
|
{% if k.startswith("REVERSE_PROXY_URL") %}
|
|
{% set url = v %}
|
|
{% set host = all[k.replace("URL", "HOST")] if k.replace("URL", "HOST") in all else "" %}
|
|
{% set ws = all[k.replace("URL", "WS")] if k.replace("URL", "WS") in all else "" %}
|
|
{% set headers = all[k.replace("URL", "HEADERS")] if k.replace("URL", "HEADERS") in all else "" %}
|
|
location {{ url }} {% raw %}{{% endraw %}
|
|
etag off;
|
|
proxy_pass {{ host }};
|
|
include {{ NGINX_PREFIX }}reverse-proxy-headers.conf;
|
|
{% if ws == "yes" %}
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "Upgrade";
|
|
{% endif %}
|
|
{% if headers != "" %}
|
|
{% for header in headers.split(";") %}
|
|
proxy_set_header {{ header }};
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% raw %}}{% endraw %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %}
|