Update basic authentication messages in Nginx configuration script
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -84,8 +84,8 @@ add_location() {
|
|||||||
echo "location $ALP_LOCAL_PATH {"
|
echo "location $ALP_LOCAL_PATH {"
|
||||||
|
|
||||||
if [ "$BASIC_AUTH" == "TRUE" ]; then
|
if [ "$BASIC_AUTH" == "TRUE" ]; then
|
||||||
echo ' auth_basic "Administrator’s Area";
|
echo ' auth_basic "SAFEBOX AUTHORIZATION";
|
||||||
auth_basic_user_file conf/htpasswd;
|
auth_basic_user_file htpasswd;
|
||||||
'
|
'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -215,8 +215,8 @@ return 301 https://$DOMAIN_NAME;
|
|||||||
echo "location / {"
|
echo "location / {"
|
||||||
|
|
||||||
if [ "$BASIC_AUTH" == "TRUE" ]; then
|
if [ "$BASIC_AUTH" == "TRUE" ]; then
|
||||||
echo ' auth_basic "Administrator’s Area";
|
echo ' auth_basic "SAFEBOX AUTHORIZATION";
|
||||||
auth_basic_user_file conf/htpasswd;
|
auth_basic_user_file htpasswd;
|
||||||
'
|
'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -320,6 +320,12 @@ location = /$ERROR_PAGE {
|
|||||||
else
|
else
|
||||||
echo "location / {"
|
echo "location / {"
|
||||||
|
|
||||||
|
if [ "$BASIC_AUTH" == "TRUE" ]; then
|
||||||
|
echo ' auth_basic "SAFEBOX AUTHORIZATION";
|
||||||
|
auth_basic_user_file htpasswd;
|
||||||
|
'
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "$ALLOWED_NETWORK" != "" ]]; then
|
if [[ "$ALLOWED_NETWORK" != "" ]]; then
|
||||||
ALLOWED_NETWORK_IDX=$(jq -r '.ALLOWED_NETWORK | length' $DOMAIN_SOURCE)
|
ALLOWED_NETWORK_IDX=$(jq -r '.ALLOWED_NETWORK | length' $DOMAIN_SOURCE)
|
||||||
ALLOWED_NETWORK_IDX=$(($ALLOWED_NETWORK_IDX - 1))
|
ALLOWED_NETWORK_IDX=$(($ALLOWED_NETWORK_IDX - 1))
|
||||||
|
Reference in New Issue
Block a user