From cec47f3a75b0bc672d7a56fbda7c9291317b12b5 Mon Sep 17 00:00:00 2001 From: bunkerity Date: Tue, 29 Jun 2021 16:36:24 +0200 Subject: [PATCH] body injection feature and add authelia to documentation --- confs/site/inject-body.conf | 1 + confs/site/server.conf | 9 +++++++-- docs/environment_variables.md | 32 +++++++++++++++++++++++++++++--- settings.json | 9 +++++++++ 4 files changed, 46 insertions(+), 5 deletions(-) create mode 100644 confs/site/inject-body.conf diff --git a/confs/site/inject-body.conf b/confs/site/inject-body.conf new file mode 100644 index 0000000..5831bad --- /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 a333398..0e7411d 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 491e213..0de0491 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. : `\