From 35ec5cc798ce9941f3d33988c3bd2362cc2f934d Mon Sep 17 00:00:00 2001 From: "A.Alimohammadi" Date: Sat, 7 Oct 2023 16:27:01 +0330 Subject: [PATCH] [merge]6699c47e [bug]FollowRedirects was not set in http request config in resttemplate starter --- .../http/core/factory/ConfigurableApacheHttpClientFactory.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tosan-httpclient-spring-boot-core/src/main/java/com/tosan/client/http/core/factory/ConfigurableApacheHttpClientFactory.java b/tosan-httpclient-spring-boot-core/src/main/java/com/tosan/client/http/core/factory/ConfigurableApacheHttpClientFactory.java index 7f698ea..35adc6e 100644 --- a/tosan-httpclient-spring-boot-core/src/main/java/com/tosan/client/http/core/factory/ConfigurableApacheHttpClientFactory.java +++ b/tosan-httpclient-spring-boot-core/src/main/java/com/tosan/client/http/core/factory/ConfigurableApacheHttpClientFactory.java @@ -1,7 +1,7 @@ package com.tosan.client.http.core.factory; -import com.tosan.client.http.core.certificate.CertificateLoader; import com.tosan.client.http.core.HttpClientProperties; +import com.tosan.client.http.core.certificate.CertificateLoader; import org.apache.commons.lang3.StringUtils; import org.apache.http.HttpHost; import org.apache.http.auth.AuthScope; @@ -68,6 +68,7 @@ private void configureTimeouts(HttpClientBuilder builder) { builder.setDefaultRequestConfig(RequestConfig.custom() .setConnectTimeout(httpClientProperties.getConnection().getConnectionTimeout()) .setSocketTimeout(httpClientProperties.getConnection().getSocketTimeout()) + .setRedirectsEnabled(httpClientProperties.getConnection().isFollowRedirects()) .build()); }