-
Notifications
You must be signed in to change notification settings - Fork 438
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
AutoConfigureHttpClient RestTemplate with InterceptingClientHttpRequestFactory #1868
Comments
Why are you filing this issue in Spring Cloud Contract project? |
org.springframework.cloud.contract.wiremock.AutoConfigureHttpClient is part of spring-cloud-contract-wiremock which is importing WireMockRestTemplateConfiguration. It would be nice if RestTemplateBuilder is already configured with SSL relaxed validation when used in combination with RestTemplate interceptors. RestTemplate with interceptors will not configure this, as per this code: and |
I think I need more sleep - I've completely forgotten about that class. Yes, definitely we're interested in this PR. |
I will create PR this days, thanks a lot! |
* Relaxed SSL validation with RestTemplate interceptors * Formatting * Checkstyle fixes #1868
Is your feature request related to a problem? Please describe.
If user defines RestTemplate with interceptor (built with RestTemplateBuilder and HttpComponentsClientHttpRequestFactory), @AutoConfigureHttpClient will not setup "relaxed SSL validation". This is because restTemplate.getRequestFactory() will return wrapper of InterceptingClientHttpRequestFactory.
Describe the solution you'd like
@AutoConfigureHttpClient will check also InterceptingClientHttpRequestFactory if it's wrapping instance of HttpComponentsClientHttpRequestFactory.class
I can submit PR.
The text was updated successfully, but these errors were encountered: