fix FORCE_HTTPS

add ip_header env
This commit is contained in:
virusdefender
2018-01-05 09:50:25 +08:00
parent 0e1d40792f
commit 679512e3cc
4 changed files with 16 additions and 4 deletions

View File

@@ -31,6 +31,12 @@ else
ln -sf https_redirect.conf http_locations.conf
fi
if [ ! -z "$LOWER_IP_HEADER" ]; then
sed -i "s/__IP_HEADER__/\$http_$LOWER_IP_HEADER/g" api_proxy.conf;
else
sed -i "s/__IP_HEADER__/\$remote_addr/g" api_proxy.conf;
fi
cd $APP/dist
if [ ! -z "$STATIC_CDN_HOST" ]; then
find . -name index.html -exec sed -i "s/link href=\/static/link href=\/\/$STATIC_CDN_HOST\/static/g" {} \;