Put extra locations above default ones in nginx config

This commit is contained in:
Salt 2022-08-30 16:11:52 -05:00
parent 34ed3289ba
commit 7a44fa5df1

View File

@ -33,6 +33,15 @@ server {
{% endfor %}
{% endif %}
{% if server.locations is defined %}
# Extra manually-defined locations
{% for location in server.locations %}
location {{ location.location }} {
{{ location.contents }}
}
{% endfor %}
{% endif %}
{% if server.proxy_pass is defined %}
# Singular proxy_pass
location / {
@ -49,15 +58,6 @@ server {
proxy_pass {{ proxy.pass }};
}
{% endfor %}
{% endif %}
{% if server.locations is defined %}
# Extra manually-defined locations
{% for location in server.locations %}
location {{ location.location }} {
{{ location.contents }}
}
{% endfor %}
{% endif %}
resolver {{ ingress_resolver }};