vhost: Add support for specifying preserve query independently of

preserve path
This commit is contained in:
uumas
2024-11-05 15:47:21 +02:00
parent 6aabccbe75
commit 05714898eb
4 changed files with 16 additions and 4 deletions

View File

@@ -41,7 +41,7 @@
request_header -{{ header }}
{% endfor %}
{% elif location.type == 'redirect' %}
redir {{ location.redirect_target }}{{ '{uri}' if location.redirect_preserve_path }} {{ location.redirect_type }}
redir * {{ location.redirect_target }}{{ '{path}' if location.redirect_preserve_path }}{{ '?{query}' if location.redirect_preserve_query }} {{ location.redirect_type }}
{% elif location.type == 'respond' %}
{% if location.respond_content_type == 'json' %}
respond `{{ location.respond_content | to_json }}`