Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Commit

Permalink
Merge "Escape the nonProxyHosts setting if the UAA happens to start u…
Browse files Browse the repository at this point in the history
…p in an environment with NO_PROXY set"
  • Loading branch information
joeldsa authored and Gerrit Code Review committed May 23, 2012
2 parents e9625d3 + d0bcd3a commit 4fa42ba
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions jobs/uaa/templates/uaa_ctl.erb
Expand Up @@ -26,8 +26,23 @@ HTTP_PROXY_JAVA_OPTIONS="$HTTP_PROXY_JAVA_OPTIONS -Dhttps.proxyHost=${proxy_conf
<% if properties.env.no_proxy %>
export NO_PROXY='<%= properties.env.no_proxy %>'
export no_proxy='<%= properties.env.no_proxy %>'
no_proxy_conf=`echo $NO_PROXY | sed -e 's/,/|/g' -e 's/ //g'`
HTTP_PROXY_JAVA_OPTIONS="$HTTP_PROXY_JAVA_OPTIONS -Dhttp.nonProxyHosts=$no_proxy_conf "
if [ x != x"$NO_PROXY" ]; then
proxy_conf=`echo $NO_PROXY | sed -e 's/ //g'`

OIFS=$IFS
IFS=','
for host in $proxy_conf; do
if [[ $host == .* ]]; then
host="*"$host
fi
java_no_proxies=$java_no_proxies"|"$host
done
IFS=$OIFS

# Strip the leading '|'
java_no_proxies=${java_no_proxies:1}
HTTP_PROXY_JAVA_OPTIONS="$HTTP_PROXY_JAVA_OPTIONS -Dhttp.nonProxyHosts=\"$java_no_proxies\" "
fi
<% end %>
<% end %>

Expand Down

0 comments on commit 4fa42ba

Please sign in to comment.