Proxy support

This commit is contained in:
Fabio Sinibaldi 2021-03-25 11:09:20 +01:00
parent 1459d8b64c
commit 8271d0b973
1 changed files with 12 additions and 1 deletions

View File

@ -71,7 +71,18 @@ public class ThreddsInstanceManager {
protected ThreddsInstanceManager(DataTransferContext context) {
log.warn("Instance Creation. Should happen only once. Loading information from context..");
this.ctx=context;
currentHostname=ctx.getCtx().container().configuration().hostname();
try {
log.info("Loading proxy configuration..");
currentHostname=ctx.getCtx().configuration().proxyAddress().hostname();
if(currentHostname==null||currentHostname.isEmpty()) throw new Exception("Proxy is : "+currentHostname);
}catch(Exception e) {
log.info("Unable to get proxy..",e);
currentHostname=ctx.getCtx().container().configuration().hostname();
}
log.info("Hostname to be used is "+currentHostname);
currentGHNId=ctx.getCtx().container().id();
String tomcatSecurityPath=System.getenv("WEB_CONTAINER_HOME")+"/conf/tomcat-users.xml";