From 860bd22f7a23cb2837770619ed24984081c1a79b Mon Sep 17 00:00:00 2001 From: Sheppy Date: Mon, 19 Feb 2024 16:23:46 +0000 Subject: [PATCH] feat: allow extra location a / content --- templates/nginx_server_block.conf.j2 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/templates/nginx_server_block.conf.j2 b/templates/nginx_server_block.conf.j2 index 7a0df95..4080773 100644 --- a/templates/nginx_server_block.conf.j2 +++ b/templates/nginx_server_block.conf.j2 @@ -25,7 +25,7 @@ server{ ssl_verify_depth 1; {% endif %} - {% if extra_location %} + {% if extra_location and not extra_location["location"] == "/" %} location {{ extra_location["location"] }} { {{ extra_location["content"] }} {% if extra_location["location-auth"] %} @@ -38,6 +38,9 @@ server{ location / { proxy_pass http://{{ targetip }}:{{ targetport }}; proxy_set_header Host $http_host; + {% if extra_location["location"] == "/" %} + {{ extra_location["content"] }} + {% endif %} {{ proxy_pass_blob }} {{ cert_header_line }} {% if basicauth %}