
the pass_auth and satisfy_any properties and now boolean true/false, they do not == 1 so the switching in this template breaks
24 lines
644 B
Text
24 lines
644 B
Text
{%- if access_list_id > 0 %}
|
|
{%- if access_list.items.length > 0 %}
|
|
# Authorization
|
|
auth_basic "Authorization required";
|
|
auth_basic_user_file /data/etc/access/{{ access_list_id }};
|
|
|
|
{%- unless access_list.pass_auth %}
|
|
proxy_set_header Authorization "";
|
|
{%- endunless %}
|
|
{%- endif %}
|
|
|
|
# Access Rules: {{ access_list.clients | size }} total
|
|
{%- for client in access_list.clients %}
|
|
{{client | nginxAccessRule}}
|
|
{%- endfor %}
|
|
deny all;
|
|
|
|
# Access checks must...
|
|
{%- if access_list.satisfy_any %}
|
|
satisfy any;
|
|
{%- else %}
|
|
satisfy all;
|
|
{%- endif %}
|
|
{%- endif %}
|