Equivalent to -Dhttp.proxyHost, -Dhttp.proxyPort and -Dhttp.nonProxyHosts to configure forward proxy #9620
Unanswered
johanHenix
asked this question in
Q&A
Replies: 1 comment 1 reply
-
There is some configuration options for proxies https://docs.micronaut.io/latest/guide/configurationreference.html#io.micronaut.http.client.DefaultHttpClientConfiguration you could write something that automatically configured these based on the values passed in these system properties. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I am migrating a service from Spring Boot to Micronaut 3.8.7 , aiming to deploy it as a native image using GraalVM, the main purpose is to reduce memory usage.
In the previous version running with Sprint Boot, we used to configure a forward proxy using system properties
http.proxyHost
,http.proxyPort
andhttp.nonProxyHosts
. It was simple and efficient. But launching Micronaut service using the injected HttpClient, such system properties seem to be ignored.Micronaut documentation indicates
I tried to use a ClientFilter in order to mutate the outgoing request and change its URI but it seems we cannot change the host nor the port, although we can change the path, parameters and headers.
Is there a solution to take these proxy system properties into account when runing a Micronaut service ? Or is there a workaround to replace this behaviour ?
Would it be possible to have this behaviour with a generated native image ?
Beta Was this translation helpful? Give feedback.
All reactions