mirror of https://github.com/apache/archiva.git
[MRM-1268] X-Forwarded-Host handling when having more than one proxy
submitted by Andreas Baumann o taking just the outermost (first one) proxy in the 'X-Forwarded-Host' HTTP field git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@898212 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
098b24d0a7
commit
c51b0e4790
|
@ -111,6 +111,12 @@ public class ContextUtils
|
|||
}
|
||||
return name;
|
||||
}
|
||||
else
|
||||
{
|
||||
// respect chains of proxies, return first one (as it's the outermost visible one)
|
||||
String[] hosts = name.split( "," );
|
||||
name = hosts[0].trim();
|
||||
}
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue