We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7eea155 commit ad9f5fcCopy full SHA for ad9f5fc
1 file changed
init.sh
@@ -36,7 +36,8 @@ function config_nginx() {
36
sed -i 's@proxy_set_header X-Forwarded-For .*;@proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;@g' "${config_file}"
37
fi
38
39
- if [ -n "${BASIC_AUTH_PASSWORD}" ] ; then
+ if [[ -n "${BASIC_AUTH_PASSWORD}" ]] ; then
40
+ rm -f /etc/nginx/.htpasswd
41
htpasswd -bc /etc/nginx/.htpasswd ${BASIC_AUTH_USER} ${BASIC_AUTH_PASSWORD}
42
sed -i "s@# auth_basic .*;@auth_basic \"Restricted Area\";@g" "${config_file}"
43
sed -i "s@# auth_basic_user_file .*;@auth_basic_user_file /etc/nginx/.htpasswd;@g" "${config_file}"
0 commit comments