Skip to content

Commit

Permalink
secureCodeBox#121 Do Not Create Proxy Config Twice
Browse files Browse the repository at this point in the history
Signed-off-by: Sven Strittmatter <[email protected]>
  • Loading branch information
Weltraumschaf committed Jul 3, 2024
1 parent 51c3122 commit 2d58c31
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ private HttpHeaders createAuthorizationHeaders() {
}

private RestTemplate setupRestTemplate() {
final RestTemplate template = new RestTemplateFactory(new ProxyConfigFactory().create()).createRestTemplate();
final RestTemplate template = new RestTemplateFactory(proxyConfig).createRestTemplate();
// TODO: Maybe all of this could be moved into the factory.
final MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();
converter.setObjectMapper(mapper.modelObjectMapper());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,13 @@ void update_containsAuthHeaderInRequest() {
}

@Nested
@Disabled("FIXME: All tests fail with this commit because Spring tries to connect via the proxy now 😬")
class AuthenticationHeaderWithProxyConfig extends WireMockBaseTestCase {
private final ProxyConfig proxyConfig = ProxyConfig.builder()
.user("alf")
.password("test1234")
.host("proxy.owasp.org")
.port(8080)
.host("localhost")
.port(4444)
.build();
private final TestableGenericDefectDojoService sut = new TestableGenericDefectDojoService(
conf(), proxyConfig
Expand Down

0 comments on commit 2d58c31

Please sign in to comment.