diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/util/ContextUtils.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/util/ContextUtils.java index 9579dbba0..f1b689cea 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/util/ContextUtils.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/util/ContextUtils.java @@ -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; } }