feat: new authorization
This commit is contained in:
@@ -1,12 +1,24 @@
|
|||||||
|
{% set allowed_ips=['10.233.212.64/27', '163.172.112.19', '2a01:e0a:9bd:2811::/64', '2a01:e0a:9bd:2810::/64', '130.180.219.188'] -%}
|
||||||
server {
|
server {
|
||||||
{% include './templates/header.conf.j2' %}
|
{% include './templates/header.conf.j2' %}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
|
deny all;
|
||||||
|
}
|
||||||
|
location /bt {
|
||||||
root /var/lib/transmission-daemon/downloads/;
|
root /var/lib/transmission-daemon/downloads/;
|
||||||
autoindex on;
|
autoindex on;
|
||||||
allow 10.233.212.64/27;
|
{% for allowed_ip in allowed_ips -%}
|
||||||
allow 163.172.112.19;
|
allow {{ allowed_ip }};
|
||||||
allow 2a01:e0a:9bd:2811::/64;
|
{% endfor -%}
|
||||||
allow 2a01:e0a:9bd:2810::/64;
|
deny all;
|
||||||
|
}
|
||||||
|
location /tank {
|
||||||
|
root /net/;
|
||||||
|
autoindex on;
|
||||||
|
{% for allowed_ip in allowed_ips -%}
|
||||||
|
allow {{ allowed_ip }};
|
||||||
|
{% endfor -%}
|
||||||
deny all;
|
deny all;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user