vhost: Support proxy forward auth
This commit is contained in:
@@ -28,6 +28,18 @@
|
||||
}
|
||||
{% endif %}
|
||||
{% if matcher.type == 'reverse_proxy' %}
|
||||
{% if matcher.proxy_auth_socket | length > 0 %}
|
||||
forward_auth {
|
||||
to unix//{{ matcher.proxy_auth_socket }}
|
||||
uri {{ matcher.proxy_auth_uri }}
|
||||
{% if matcher.proxy_auth_unauthorized_redir | length > 0 %}
|
||||
@unauthorized status 401
|
||||
handle_response @unauthorized {
|
||||
redir * {{ matcher.proxy_auth_unauthorized_redir }}
|
||||
}
|
||||
{% endif %}
|
||||
}
|
||||
{% endif %}
|
||||
reverse_proxy {
|
||||
{% if matcher.proxy_target_netproto == 'tcp' %}
|
||||
to tcp/{{ matcher.proxy_target_host }}:{{ matcher.proxy_target_port }}
|
||||
|
||||
Reference in New Issue
Block a user