[ACA-2470] encode urls for docker entrypoint

This commit is contained in:
Denys Vuika 2019-06-20 15:28:05 +01:00
parent 900d002a08
commit 6e894fc196

View File

@ -60,7 +60,9 @@ if [ -n "${APP_CONFIG_OAUTH2_REDIRECT_LOGOUT}" ];then
fi
if [[ $ACSURL ]]; then
sed -i s%{protocol}//{hostname}{:port}%"$ACSURL"%g /tmp/app.config.json && \
replace="\/"
encoded=${ACSURL//\//$replace}
sed -i s%{protocol}//{hostname}{:port}%"$encoded"%g /tmp/app.config.json && \
cat /tmp/app.config.json > ./app.config.json
fi
@ -70,7 +72,9 @@ if [[ $BASEPATH ]]; then
fi
if [ -n "${APP_BASE_SHARE_URL}" ];then
sed -e "s/\"baseShareUrl\": \".*\"/\"baseShareUrl\": \"${APP_BASE_SHARE_URL}\"/g" \
replace="\/"
encoded=${APP_BASE_SHARE_URL//\//$replace}
sed -e "s/\"baseShareUrl\": \".*\"/\"baseShareUrl\": \"${encoded}\"/g" \
-i /tmp/app.config.json && \
cat /tmp/app.config.json > ./app.config.json
fi