nonProxyHosts allows to use * for pattern matching. For example -Dhttp.nonProxyHosts=” *.foo.com|localhost”
But Openshift doesn't accept does not accept * attached to a domain suffix.
Your script can be improved to prefix .foo.com with a *. I've got this need on a professional and private project and we solve it with this script :
# Replace separator "," by "|"
JAVA_NO_PROXY=$(echo $no_proxy | sed -e 's/,[[:space:]]*/|/g')
# Prefix hosts with a wildcard '*' (ex: '.svc' -> '*.svc') because OpenShift doesn't allow wildcards in $no_proxy
JAVA_NO_PROXY=$(echo $JAVA_NO_PROXY | sed -e 's/^\./*./g' | sed -e 's/|\./|*./g')
https://github.com/fabric8io-images/s2i/blob/c8452f3ada82bae6b162cd2fc87198e703e38c9d/karaf/images/rhel/run-java.sh#L465
Hi,
nonProxyHosts
allows to use*
for pattern matching. For example -Dhttp.nonProxyHosts=” *.foo.com|localhost”But Openshift doesn't accept does not accept
*
attached to a domain suffix.Your script can be improved to prefix
.foo.com
with a*
. I've got this need on a professional and private project and we solve it with this script :I hope it will help.
Kind regards,
Mathieu
references :