File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,8 @@ for CONTAINER in ${AUTO_GEN}; do
6767 echo " **** Overriding proto as ${swag_proto} for ${CONTAINER} ****"
6868 fi
6969 if [ -n " ${swag_url} " ]; then
70- sed -i " s|server_name .*|server_name ${swag_url} ;|" " /etc/nginx/http.d/auto-proxy-${CONTAINER} .subdomain.conf"
70+ SED_swag_url=$( sed -e ' s/[&\\|]/\\&/g; s|$|\\|; $s|\\$||' <<< " ${swag_url}" )
71+ sed -i " s|server_name .*|server_name ${SED_swag_url} ;|" " /etc/nginx/http.d/auto-proxy-${CONTAINER} .subdomain.conf"
7172 echo " **** Overriding url as ${swag_url} for ${CONTAINER} ****"
7273 fi
7374 if [ " ${swag_auth} " == " authelia" ]; then
133134 if [ -z " ${swag_url} " ]; then
134135 swag_url=" ${CONTAINER} .*"
135136 fi
136- sed -i " s|server_name .*|server_name ${swag_url} ;|" " /etc/nginx/http.d/auto-proxy-${CONTAINER} .subdomain.conf"
137+ SED_swag_url=$( sed -e ' s/[&\\|]/\\&/g; s|$|\\|; $s|\\$||' <<< " ${swag_url}" )
138+ sed -i " s|server_name .*|server_name ${SED_swag_url} ;|" " /etc/nginx/http.d/auto-proxy-${CONTAINER} .subdomain.conf"
137139 echo " **** Setting url ${swag_url} for ${CONTAINER} ****"
138140 if [ " ${swag_auth} " == " authelia" ]; then
139141 sed -i " s|#include /config/nginx/authelia|include /config/nginx/authelia|g" " /etc/nginx/http.d/auto-proxy-${CONTAINER} .subdomain.conf"
You can’t perform that action at this time.
0 commit comments