Skip to content

Commit e91bb65

Browse files
committed
CLOUD-2084 properly translate no_proxy variable settings for use with Java
Signed-off-by: rcernich <rcernich@redhat.com>
1 parent dfba668 commit e91bb65

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

os-java-run/added/proxy-options

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ proxy_options() {
4242

4343
local noProxy="${no_proxy:-${NO_PROXY}}"
4444
if [ -n "$noProxy" ] ; then
45-
ret="$ret -Dhttp.nonProxyHosts=\"$(echo $noProxy | sed -e 's+,+|+g')\""
45+
noProxy="${noProxy//,/|}" # replace separator
46+
noProxy="${noProxy//|./|*.}" # replace domain with leading . with *.
47+
noProxy="${noProxy/#./*.}" # same as previous, but first domain in list (i.e. no preceding separator)
48+
ret="$ret -Dhttp.nonProxyHosts=\"$noProxy\""
4649
fi
4750
echo "$ret"
4851
}

0 commit comments

Comments
 (0)