Update basic authentication messages in Nginx configuration script
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
gyurix
2025-04-21 10:33:00 +02:00
parent 18ff17af6a
commit 8f23ff58ac

View File

@@ -84,8 +84,8 @@ add_location() {
echo "location $ALP_LOCAL_PATH {"
if [ "$BASIC_AUTH" == "TRUE" ]; then
echo ' auth_basic "Administrators 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 "Administrators 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))