This commit is contained in:
parent
0b43023eda
commit
0c6900f2d9
@ -13,6 +13,19 @@ server {
|
|||||||
|
|
||||||
index index.php index.html;
|
index index.php index.html;
|
||||||
|
|
||||||
|
{%- if internal and not auth %}
|
||||||
|
if ($allow = false) {
|
||||||
|
return 403;
|
||||||
|
}
|
||||||
|
{%- endif %}
|
||||||
|
if ($allow = true) {
|
||||||
|
set $auth "off";
|
||||||
|
}
|
||||||
|
{%- if auth %}
|
||||||
|
auth_basic $auth;
|
||||||
|
auth_basic_user_file {{ config_dir }}/auth/htpasswd;
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
{%- for key,value in headers.items() %}
|
{%- for key,value in headers.items() %}
|
||||||
add_header {{ key }} "{{ value }}";
|
add_header {{ key }} "{{ value }}";
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
@ -16,6 +16,20 @@ server {
|
|||||||
error_page 404 /core/templates/404.php;
|
error_page 404 /core/templates/404.php;
|
||||||
client_max_body_size 4G;
|
client_max_body_size 4G;
|
||||||
fastcgi_buffers 64 4K;
|
fastcgi_buffers 64 4K;
|
||||||
|
|
||||||
|
{%- if internal and not auth %}
|
||||||
|
if ($allow = false) {
|
||||||
|
return 403;
|
||||||
|
}
|
||||||
|
{%- endif %}
|
||||||
|
if ($allow = true) {
|
||||||
|
set $auth "off";
|
||||||
|
}
|
||||||
|
{%- if auth %}
|
||||||
|
auth_basic $auth;
|
||||||
|
auth_basic_user_file {{ config_dir }}/auth/htpasswd;
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
||||||
{%- for key,value in headers.items() %}
|
{%- for key,value in headers.items() %}
|
||||||
add_header {{ key }} "{{ value }}";
|
add_header {{ key }} "{{ value }}";
|
||||||
|
@ -13,6 +13,19 @@ server {
|
|||||||
|
|
||||||
index index.php index.html;
|
index index.php index.html;
|
||||||
|
|
||||||
|
{%- if internal and not auth %}
|
||||||
|
if ($allow = false) {
|
||||||
|
return 403;
|
||||||
|
}
|
||||||
|
{%- endif %}
|
||||||
|
if ($allow = true) {
|
||||||
|
set $auth "off";
|
||||||
|
}
|
||||||
|
{%- if auth %}
|
||||||
|
auth_basic $auth;
|
||||||
|
auth_basic_user_file {{ config_dir }}/auth/htpasswd;
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
{%- for key,value in headers.items() %}
|
{%- for key,value in headers.items() %}
|
||||||
add_header {{ key }} "{{ value }}";
|
add_header {{ key }} "{{ value }}";
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
Loading…
Reference in New Issue
Block a user