Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 97dd5828 authored by Joze RIHTARSIC's avatar Joze RIHTARSIC
Browse files

update proxy parameters

parent 7a50b0a4
No related branches found
No related tags found
No related merge requests found
......@@ -33,8 +33,8 @@ public enum SMPPropertyEnum {
HTTP_PROXY_HOST("smp.proxy.host", "", "The http proxy host", false,false, SMPPropertyTypeEnum.STRING),
HTTP_NO_PROXY_HOSTS("smp.noproxy.hosts", "localhost|127.0.0.1", "list of nor proxy hosts. Ex.: localhost|127.0.0.1", false,false, SMPPropertyTypeEnum.STRING),
HTTP_PROXY_PASSWORD("smp.proxy.password", "", "Base64 encrypted password for Proxy.", false, true,SMPPropertyTypeEnum.STRING),
HTTP_PROXY_PORT("smp.http.port", "80", "The http proxy port", false, false, SMPPropertyTypeEnum.INTEGER),
HTTP_PROXY_USER("smp.http.user", "", "The proxy user", false, false, SMPPropertyTypeEnum.STRING),
HTTP_PROXY_PORT("smp.proxy.port", "80", "The http proxy port", false, false, SMPPropertyTypeEnum.INTEGER),
HTTP_PROXY_USER("smp.proxy.user", "", "The proxy user", false, false, SMPPropertyTypeEnum.STRING),
KEYSTORE_PASSWORD("smp.keystore.password","","Encrypted keystore (and keys) password ", false, true, SMPPropertyTypeEnum.STRING),
......
......@@ -418,8 +418,8 @@ public class SmlConnector implements ApplicationContextAware {
}
String noProxyHosts = configurationService.getHttpNoProxyHosts();
if (!HttpUtils.doesTargetMatchNonProxy(targetUrl.getHost(), configurationService.getHttpNoProxyHosts())) {
LOG.info("Terget host {} is match noProxy hosts {}!", targetUrl.getHost(), noProxyHosts);
if (HttpUtils.doesTargetMatchNonProxy(targetUrl.getHost(), configurationService.getHttpNoProxyHosts())) {
LOG.info("Target host {} is match noProxy hosts {}!", targetUrl.getHost(), noProxyHosts);
return;
}
String proxyServer = configurationService.getHttpProxyHost();
......@@ -435,9 +435,13 @@ public class SmlConnector implements ApplicationContextAware {
httpConduit.getClient().setProxyServerPort(proxyPort.get());
}
ProxyAuthorizationPolicy proxyAuth = new ProxyAuthorizationPolicy();
proxyAuth.setUserName(proxyUser);
proxyAuth.setPassword(proxyPassword);
httpConduit.setProxyAuthorization(proxyAuth);
if (!StringUtils.isBlank(proxyUser)){
LOG.debug("Set proxy authentication {}", proxyUser);
proxyAuth.setUserName(proxyUser);
proxyAuth.setPassword(proxyPassword);
httpConduit.setProxyAuthorization(proxyAuth);
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment