Files
nginx-proxy-manager/backend/templates/_access.conf
T
Jamie Curnow 99678969b3 Fix a proxy host whose access list can't be loaded is now denied to
everyone instead of being served with no restrictions
2026-11-09 22:04:32 +10:00

33 lines
922 B
Plaintext

{% if access_list_id > 0 %}
{% if access_list %}
{% if access_list.items.length > 0 %}
# Authorization
auth_basic "Authorization required";
auth_basic_user_file /data/access/{{ access_list_id }};
{% if access_list.pass_auth == 0 or access_list.pass_auth == false %}
proxy_set_header Authorization "";
{% endif %}
{% endif %}
{% if access_list.clients.length > 0 %}
# Access Rules: {{ access_list.clients | size }} total
{% for client in access_list.clients %}
{{client | nginxAccessRule}}
{% endfor %}
deny all;
{% endif %}
# Access checks must...
{% if access_list.satisfy_any == 1 or access_list.satisfy_any == true %}
satisfy any;
{% else %}
satisfy all;
{% endif %}
{% else %}
# Access List #{{ access_list_id }} could not be loaded: deny rather than serve unrestricted
deny all;
{% endif %}
{% endif %}