feat: allow extra location a / content

This commit is contained in:
2024-02-19 16:23:46 +00:00
parent de148b1686
commit 860bd22f7a

View File

@@ -25,7 +25,7 @@ server{
ssl_verify_depth 1; ssl_verify_depth 1;
{% endif %} {% endif %}
{% if extra_location %} {% if extra_location and not extra_location["location"] == "/" %}
location {{ extra_location["location"] }} { location {{ extra_location["location"] }} {
{{ extra_location["content"] }} {{ extra_location["content"] }}
{% if extra_location["location-auth"] %} {% if extra_location["location-auth"] %}
@@ -38,6 +38,9 @@ server{
location / { location / {
proxy_pass http://{{ targetip }}:{{ targetport }}; proxy_pass http://{{ targetip }}:{{ targetport }};
proxy_set_header Host $http_host; proxy_set_header Host $http_host;
{% if extra_location["location"] == "/" %}
{{ extra_location["content"] }}
{% endif %}
{{ proxy_pass_blob }} {{ proxy_pass_blob }}
{{ cert_header_line }} {{ cert_header_line }}
{% if basicauth %} {% if basicauth %}