diff --git a/confs/site/reverse-proxy.conf b/confs/site/reverse-proxy.conf index 1678bd1..1c8f468 100644 --- a/confs/site/reverse-proxy.conf +++ b/confs/site/reverse-proxy.conf @@ -5,10 +5,16 @@ {% 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 "" %} + {% set buffering = all[k.replace("URL", "BUFFERING")] if k.replace("URL", "BUFFERING") in all else "yes" %} location {{ url }} {% raw %}{{% endraw +%} etag off; set $backend "{{ host }}"; proxy_pass $backend; + {% if buffering == "yes" +%} + proxy_buffering on; + {% else +%} + proxy_buffering off; + {% endif %} {% if USE_AUTHELIA == "yes" +%} include {{ NGINX_PREFIX }}authelia-auth-request.conf; {% endif %} diff --git a/docs/environment_variables.md b/docs/environment_variables.md index 2597eb3..2c736d7 100644 --- a/docs/environment_variables.md +++ b/docs/environment_variables.md @@ -207,6 +207,13 @@ Context : *global*, *multisite* Only valid when `USE_REVERSE_PROXY` is set to *yes*. Set it to *yes* when the corresponding `REVERSE_PROXY_HOST` is a WebSocket server. You can set multiple url/host by adding a suffix number to the variable name like this : `REVERSE_PROXY_WS_1`, `REVERSE_PROXY_WS_2`, `REVERSE_PROXY_WS_3`, ... +`REVERSE_PROXY_BUFFERING` +Values : *yes* | *no* +Default value : *yes* +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. +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_HEADERS` Values : *\* Default value : diff --git a/settings.json b/settings.json index 86ea47e..96bc25a 100644 --- a/settings.json +++ b/settings.json @@ -1070,6 +1070,16 @@ "regex": "^(yes|no)$", "type": "checkbox" }, + { + "context": "multisite", + "default": "yes", + "env": "REVERSE_PROXY_BUFFERING", + "id": "reverse-proxy-buffering", + "label": "Reverse proxy buffering", + "multiple": "Reverse proxy", + "regex": "^(yes|no)$", + "type": "checkbox" + }, { "context": "multisite", "default": "",