mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
nginx/security: fix empty webadmin allowlist breaking nginx conf...
This commit is contained in:
parent
97c0128c22
commit
e458d8813e
1 changed files with 5 additions and 3 deletions
|
@ -7,9 +7,11 @@ location /yunohost/admin/ {
|
|||
index index.html;
|
||||
|
||||
{% if webadmin_allowlist_enabled == "True" %}
|
||||
{% for ip in webadmin_allowlist.split(',') %}
|
||||
allow {{ ip }};
|
||||
{% endfor %}
|
||||
{% if webadmin_allowlist.strip() -%}
|
||||
{% for ip in webadmin_allowlist.strip().split(',') -%}
|
||||
allow {{ ip.strip() }};
|
||||
{% endfor -%}
|
||||
{% endif -%}
|
||||
deny all;
|
||||
{% endif %}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue