From 8f23ff58ac62ed602c0d1445fef9c6ff875b61dc Mon Sep 17 00:00:00 2001 From: gyurix Date: Mon, 21 Apr 2025 10:33:00 +0200 Subject: [PATCH] Update basic authentication messages in Nginx configuration script --- scripts/nginx_config_create.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/scripts/nginx_config_create.sh b/scripts/nginx_config_create.sh index d495b31..6780a5e 100755 --- a/scripts/nginx_config_create.sh +++ b/scripts/nginx_config_create.sh @@ -84,8 +84,8 @@ add_location() { echo "location $ALP_LOCAL_PATH {" if [ "$BASIC_AUTH" == "TRUE" ]; then - echo ' auth_basic "Administrator’s Area"; - auth_basic_user_file conf/htpasswd; + echo ' auth_basic "SAFEBOX AUTHORIZATION"; + auth_basic_user_file htpasswd; ' fi @@ -215,8 +215,8 @@ return 301 https://$DOMAIN_NAME; echo "location / {" if [ "$BASIC_AUTH" == "TRUE" ]; then - echo ' auth_basic "Administrator’s Area"; - auth_basic_user_file conf/htpasswd; + echo ' auth_basic "SAFEBOX AUTHORIZATION"; + auth_basic_user_file htpasswd; ' fi @@ -320,6 +320,12 @@ location = /$ERROR_PAGE { else echo "location / {" + if [ "$BASIC_AUTH" == "TRUE" ]; then + echo ' auth_basic "SAFEBOX AUTHORIZATION"; + auth_basic_user_file htpasswd; + ' + fi + if [[ "$ALLOWED_NETWORK" != "" ]]; then ALLOWED_NETWORK_IDX=$(jq -r '.ALLOWED_NETWORK | length' $DOMAIN_SOURCE) ALLOWED_NETWORK_IDX=$(($ALLOWED_NETWORK_IDX - 1))