Skip to content

Commit

Permalink
Fix construction of https_proxy in buildpack .profile use
Browse files Browse the repository at this point in the history
  • Loading branch information
rahearn committed Jan 16, 2025
1 parent e260a9b commit 65bb4ed
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions proxy/.profile
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,15 @@ ntnefina deny.acl
ntnefina allow.acl

# Make it easy to run curl tests on ourselves both locally and deployed
proxy_scheme="http"
proxy_host="localhost"
scheme="http"
proxy_port="8080"
if [ -n "$VCAP_APPLICATION" ]; then
proxy_scheme="https"
proxy_host=`echo "$VCAP_APPLICATION" | jq -r '.application_uris[0]'`
scheme="https"
proxy_port="61443"
fi
https_proxy="$scheme://$PROXY_USERNAME:$PROXY_PASSWORD@$proxy_host:$PORT"
export https_proxy
export https_proxy="$proxy_scheme://$PROXY_USERNAME:$PROXY_PASSWORD@$proxy_host:$proxy_port"

# Make open ports configurable via the PROXY_PORTS environment variable.
# For example "80 443 22 61443". Default to 443 only.
Expand Down

0 comments on commit 65bb4ed

Please sign in to comment.