[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:
Maria Odea B. Ching 2010-01-12 07:56:46 +00:00
parent 098b24d0a7
commit c51b0e4790
1 changed files with 6 additions and 0 deletions

View File

@ -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;
}
}