vhost: Add support for http basic auth

This commit is contained in:
uumas
2023-05-09 21:39:37 +03:00
parent ac43d9288a
commit e4dcc74610
4 changed files with 34 additions and 0 deletions

View File

@@ -11,6 +11,13 @@
{% for header in location.headers | dict2items %}
header {{ header.key }} `{{ header.value }}`
{% endfor %}
{% if location.basicauth %}
basicauth {
{% for user in location.basicauth_users | dict2items %}
{{ user.key }} {{ user.value }}
{% endfor %}
}
{% endif %}
{% if location.type == 'reverse_proxy' %}
reverse_proxy {{ location.proxy_target_protocol }}://{{ location.proxy_target_host }}:{{ location.proxy_target_port }} {
{% if location.proxy_target_protocol == 'https' and location.proxy_target_host == 'localhost' %}