Prioritize X-Forwarded-Host when choosing the service parameter
Use X-Forwarded-Host whenever it's available.
This commit is contained in:
parent
ba50664582
commit
2b1b7a142a
|
|
@ -237,11 +237,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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue