updated nginx state
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Paul 2025-01-13 14:54:16 +07:00
parent 0b43023eda
commit 0c6900f2d9
3 changed files with 40 additions and 0 deletions

View File

@ -13,6 +13,19 @@ server {
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() %}
add_header {{ key }} "{{ value }}";
{%- endfor %}

View File

@ -16,6 +16,20 @@ server {
error_page 404 /core/templates/404.php;
client_max_body_size 4G;
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;
{%- for key,value in headers.items() %}
add_header {{ key }} "{{ value }}";

View File

@ -13,6 +13,19 @@ server {
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() %}
add_header {{ key }} "{{ value }}";
{%- endfor %}