mirror of
https://github.com/samply/bridgehead.git
synced 2025-06-17 03:40:14 +02:00
Added SECURE_PROXY if the https and http proxy are the same
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
detectCompose() {
|
||||
if [[ "$(docker compose version 2>/dev/null)" == *"Docker Compose version"* ]]; then
|
||||
COMPOSE="docker compose"
|
||||
else
|
||||
e
|
||||
COMPOSE="docker-compose"
|
||||
# This is intended to fail on startup in the next prereq check.
|
||||
fi
|
||||
@ -15,8 +15,13 @@ setupProxy() {
|
||||
PROTO="$(echo $HTTP_PROXY_URL | grep :// | sed -e's,^\(.*://\).*,\1,g')"
|
||||
URL="$(echo ${HTTP_PROXY_URL/$PROTO/})"
|
||||
PROXY="$(echo $PROTO$HTTP_PROXY_USERNAME:$HTTP_PROXY_PASSWORD@$URL)"
|
||||
|
||||
SECURE_PROTO="$(echo $HTTPS_PROXY_URL | grep :// | sed -e's,^\(.*://\).*,\1,g')"
|
||||
SECURE_URL="$(echo ${HTTPS_PROXY_URL/$SECURE_PROTO/})"
|
||||
SECURE_PROXY="$(echo $SECURE_PROTO$HTTP_PROXY_USERNAME:$HTTP_PROXY_PASSWORD@$SECURE_URL)"
|
||||
else
|
||||
PROXY=$HTTP_PROXY_URL
|
||||
SECURE_PROXY=$HTTPS_PROXY_URL
|
||||
fi
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user