Add handles to ingress role

This commit is contained in:
Salt 2021-10-02 21:42:27 -05:00
parent a7aa38a8e9
commit 0586eb5ce9
2 changed files with 13 additions and 0 deletions

View File

@ -45,6 +45,10 @@ ingress_tls_prefer_server_ciphers: "off"
# location = /.well-known/caldav { return 301 /remote.php/dav/; }
# location ^~ /.well-known { return 301 /index.php$uri; }
# try_files $uri $uri/ =404;
# handles:
# - handle: "^~ /.well-known/foo"
# contents: |
# respond `bar`
# - name: redirect.example.com
# directives:
# # NOTE: Do NOT suffix with a semicolon; that gets added for you

View File

@ -52,6 +52,15 @@ server {
{{ location.contents }}
}
{% endfor %}
{% endif %}
{% if server.handles is defined %}
# Extra manually-defined handlers
{% for handle in server.handles %}
handle {{ handle.handle }} {
{{ handle.contents }}
}
{% endfor %}
{% endif %}
resolver {{ ingress_resolver }};