conf - add REVERSE_PROXY_KEEPALIVE
This commit is contained in:
parent
b079c99fb9
commit
3d2f5e2389
@ -6,6 +6,7 @@
|
|||||||
{% set ws = all[k.replace("URL", "WS")] if k.replace("URL", "WS") 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 "" %}
|
{% set headers = all[k.replace("URL", "HEADERS")] if k.replace("URL", "HEADERS") in all else "" %}
|
||||||
{% set buffering = all[k.replace("URL", "BUFFERING")] if k.replace("URL", "BUFFERING") in all else "yes" %}
|
{% set buffering = all[k.replace("URL", "BUFFERING")] if k.replace("URL", "BUFFERING") in all else "yes" %}
|
||||||
|
{% set keepalive = all[k.replace("URL", "KEEPALIVE")] if k.replace("URL", "KEEPALIVE") in all else "yes" %}
|
||||||
location {{ url }} {% raw %}{{% endraw +%}
|
location {{ url }} {% raw %}{{% endraw +%}
|
||||||
etag off;
|
etag off;
|
||||||
set $backend "{{ host }}";
|
set $backend "{{ host }}";
|
||||||
@ -19,11 +20,12 @@ location {{ url }} {% raw %}{{% endraw +%}
|
|||||||
include {{ NGINX_PREFIX }}authelia-auth-request.conf;
|
include {{ NGINX_PREFIX }}authelia-auth-request.conf;
|
||||||
{% endif %}
|
{% endif %}
|
||||||
include {{ NGINX_PREFIX }}reverse-proxy-headers.conf;
|
include {{ NGINX_PREFIX }}reverse-proxy-headers.conf;
|
||||||
proxy_http_version 1.1;
|
|
||||||
{% if ws == "yes" +%}
|
{% if ws == "yes" +%}
|
||||||
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "Upgrade";
|
proxy_set_header Connection "Upgrade";
|
||||||
{% else %}
|
{% elif keepalive == "yes" +%}
|
||||||
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Connection "";
|
proxy_set_header Connection "";
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if headers != "" %}
|
{% if headers != "" %}
|
||||||
|
|||||||
@ -220,6 +220,13 @@ Context : *global*, *multisite*
|
|||||||
Only valid when `USE_REVERSE_PROXY` is set to *yes*. Set it to *yes* then the [proxy_buffering](https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffering) directive will be set to `on` or `off` otherwise.
|
Only valid when `USE_REVERSE_PROXY` is set to *yes*. Set it to *yes* then the [proxy_buffering](https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffering) directive will be set to `on` or `off` otherwise.
|
||||||
You can set multiple url/host by adding a suffix number to the variable name like this : `REVERSE_PROXY_BUFFERING_1`, `REVERSE_PROXY_BUFFERING_2`, `REVERSE_PROXY_BUFFERING_3`, ...
|
You can set multiple url/host by adding a suffix number to the variable name like this : `REVERSE_PROXY_BUFFERING_1`, `REVERSE_PROXY_BUFFERING_2`, `REVERSE_PROXY_BUFFERING_3`, ...
|
||||||
|
|
||||||
|
`REVERSE_PROXY_KEEPALIVE`
|
||||||
|
Values : *yes* | *no*
|
||||||
|
Default value : *yes*
|
||||||
|
Context : *global*, *multisite*
|
||||||
|
Only valid when `USE_REVERSE_PROXY` is set to *yes*. Set it to *yes* to enable keepalive connections with the backend (needs a HTTP 1.1 backend) or *no* otherwise.
|
||||||
|
You can set multiple url/host by adding a suffix number to the variable name like this : `REVERSE_PROXY_KEEPALIVE_1`, `REVERSE_PROXY_KEEPALIVE_2`, `REVERSE_PROXY_KEEPALIVE_3`, ...
|
||||||
|
|
||||||
`REVERSE_PROXY_HEADERS`
|
`REVERSE_PROXY_HEADERS`
|
||||||
Values : *\<list of custom headers separated with a semicolon like this : header1 value1;header2 value2...\>*
|
Values : *\<list of custom headers separated with a semicolon like this : header1 value1;header2 value2...\>*
|
||||||
Default value :
|
Default value :
|
||||||
|
|||||||
@ -1097,6 +1097,16 @@
|
|||||||
"regex": "^(yes|no)$",
|
"regex": "^(yes|no)$",
|
||||||
"type": "checkbox"
|
"type": "checkbox"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"context": "multisite",
|
||||||
|
"default": "yes",
|
||||||
|
"env": "REVERSE_PROXY_KEEPALIVE",
|
||||||
|
"id": "reverse-proxy-keepalive",
|
||||||
|
"label": "Reverse proxy keepalive",
|
||||||
|
"multiple": "Reverse proxy",
|
||||||
|
"regex": "^(yes|no)$",
|
||||||
|
"type": "checkbox"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"context": "multisite",
|
"context": "multisite",
|
||||||
"default": "",
|
"default": "",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user