How do I specify a http proxy to use when running a spring-boot fat war as a tomcat server?
I have tried the following which is not working.
java -jar my-application.war --http.proxyHost=localhost --http.proxyPort=3128 --https.proxyHost=localhost --https.proxyPort=3128
and
java -jar my-application.war -Dhttp.proxyHost=localhost -Dhttp.proxyPort=3128 -Dhttps.proxyHost=localhost -Dhttps.proxyPort=3128
A reverse proxy server is a type of proxy server that retrieves resources on behalf of a client from one or more servers. These resources are then returned to the client, as if they were originated from the proxy server itself.
Set the JVM flags http. proxyHost and http. proxyPort when starting your JVM on the command line. This is usually done in a shell script (in Unix) or bat file (in Windows).
I've found that I need -Dhttps.proxySet=true in order for the proxy config to actually be used.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With