HTTPS nonProxyHosts的JVM参数 [英] JVM arguments for HTTPS nonProxyHosts

查看:3585
本文介绍了HTTPS nonProxyHosts的JVM参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有一个相当加载的env变量,用于 _JAVA_OPTIONS

So I have a fairly loaded env variable for _JAVA_OPTIONS

export _JAVA_OPTIONS="-Dhttp.proxyHost=my-proxy.com -Dhttp.proxyPort=1080 
  -Dhttps.proxyHost=my-proxy.com -Dhttps.proxyPort=1080 
  -DsocksProxyHost=my-socks-proxy.com 
  -Dhttp.nonProxyHosts=\"localhost|127.0.0.1|*.local|*.my-co.com\""

但是,当我使用Apache HTTP客户端API从Scala代码尝试时,我无法忽略内部服务器url。

However I couldn't get it to ignore an internal server url when I tried it from Scala code using Apache HTTP client API.

https://username:pwd@server.my-co.com/foo/bar

是否需要为HTTPS指定不同的 nonProxyHosts ?文档没有指定这样的参数。我失踪了什么我在Mac上。

Do I need to specify a different nonProxyHosts for HTTPS? The documentation didn't specify such a parameter. What am I missing? I am on a Mac.

推荐答案

这个答案是主要的问题,无论什么原因,我以为这是ColdFusion的具体

This answer is for the main question, and for whatever reason I originally thought this was ColdFusion specific.

很少有文档记录,但您可以使用https非代理主机参数:

It is rarely documented, but there is an https non proxy host argument you can use:

- Dhttps.nonProxyHosts =

-Dhttps.nonProxyHosts=

很多文档说明-Dhttp.nonProxyHosts将覆盖两者。例如,Coldfusion就是这样。在其他情况下,说Weblogic,你必须有两个参数,既有http和https版本。

A lot of documentation states that -Dhttp.nonProxyHosts will cover both. For example, that is the case in Coldfusion. In other cases, say Weblogic, you have to have both arguments, both the http and https versions.

对于ColdFusion,他认为它不起作用是ColdFusion是向Dhttp.nonProxyHosts参数添加引号:

For ColdFusion, he reason it doesn't work is that ColdFusion is adding quotes to the Dhttp.nonProxyHosts argument:

-Dhttp.nonProxyHosts =我的服务器

-Dhttp.nonProxyHosts=""my-server""

如果你不使用引号,你应该是好的:

If you don't use quotes you should be good:

-Dhttp.nonProxyHosts = my-server

-Dhttp.nonProxyHosts=my-server

这篇关于HTTPS nonProxyHosts的JVM参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆