-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow customising HC5 RequestConfig in EurekaClientHttpRequestFactorySupplier #4391
Comments
I learned that the private RequestConfig buildRequestConfig() {
return RequestConfig.custom()
// v
.setProtocolUpgradeEnabled(false)
// ^
.setConnectTimeout(Timeout.of(timeoutProperties.getConnectTimeout(), TimeUnit.MILLISECONDS))
.setConnectionRequestTimeout(
Timeout.of(timeoutProperties.getConnectRequestTimeout(), TimeUnit.MILLISECONDS))
.build();
} That's not the smartest thing to do since its involvement is conditional on Ideally I'd find a way to inject this setting in less invasive manner. |
Thanks, @mamachanko and thank you for the workaround. Will look into creating a better way of handling this. |
A PR has been created to provide a |
Is your feature request related to a problem? Please describe.
I would like to disable protocol upgrades for Eureka client and server HTTP client, because with Spring Boot 3.4.0 ...
There's a workaround suggested. However, providing a custom
HttpComponentsClientHttpRequestFactoryBuilder
bean does not affect Eureka's client and server HTTP clients. Afaik that's because they do not consider that bean, but create their own.Describe the solution you'd like
As a first step, I would love a recommendation for how to customize Eureka server and client HTTP clients to disable protocol upgrades. Eventually, maybe in future versions, it would be great if there was a property one could set.
Describe alternatives you've considered
I have tried to provide my own
EurekaClientHttpRequestFactorySupplier
which is essentially a copied of theDefaultEurekaClientHttpRequestFactorySupplier
with:but calls to the Eureka server still try to upgrade the protocol
The text was updated successfully, but these errors were encountered: