Merge pull request #251 from inghamn/patch-1

Prioritize X-Forwarded-Host when choosing the service parameter
This commit is contained in:
Hal Deadman 2019-05-29 19:15:12 -04:00 committed by GitHub
commit 52274f828f
1 changed files with 1 additions and 5 deletions

View File

@ -238,11 +238,7 @@ public final class CommonUtils {
final String xHost = request.getHeader("X-Forwarded-Host");
final String comparisonHost;
if (xHost != null && host == "localhost") {
comparisonHost = xHost;
} else {
comparisonHost = host;
}
comparisonHost = (xHost != null) ? xHost : host;
if (comparisonHost == null) {
return serverName;