diff --git a/confs/site/inject-body.conf b/confs/site/inject-body.conf new file mode 100644 index 000000000..5831badd8 --- /dev/null +++ b/confs/site/inject-body.conf @@ -0,0 +1 @@ +sub_filter '' '{{ INJECT_BODY }}'; diff --git a/confs/site/server.conf b/confs/site/server.conf index a333398a2..0e7411daa 100644 --- a/confs/site/server.conf +++ b/confs/site/server.conf @@ -166,8 +166,13 @@ server { # authelia {% if USE_AUTHELIA == "yes" %} - include {{ NGINX_PREFIX}}authelia-upstream.conf; - include {{ NGINX_PREFIX}}authelia-auth-request.conf; + include {{ NGINX_PREFIX }}authelia-upstream.conf; + include {{ NGINX_PREFIX }}authelia-auth-request.conf; +{% endif %} + + # inject into body +{% if INJECT_BODY != "" %} + include {{ NGINX_PREFIX}}inject-body.conf; {% endif %} # reverse proxy diff --git a/docs/environment_variables.md b/docs/environment_variables.md index 491e213a4..0de049166 100644 --- a/docs/environment_variables.md +++ b/docs/environment_variables.md @@ -99,6 +99,12 @@ Default value : 2048 Context : *global* Sets the value of the [worker_rlimit_nofile](https://nginx.org/en/docs/ngx_core_module.html#worker_rlimit_nofile) directive. +`INJECT_BODY` +Values : *\* +Default value : +Context : *global*, *multisite* +Use this variable to inject any HTML code you want before the \ tag (e.g. : `\