Skip to content

Commit 74a1aa0

Browse files
committed
remove forwarded host
1 parent 7cf38e9 commit 74a1aa0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Illuminate/Http/Middleware/TrustProxies.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ protected function setTrustedProxyIpAddresses(Request $request)
7575
$trustedIps = '*';
7676
}
7777

78+
if (str_ends_with($request->host(), '.on-forge.com') ||
79+
str_ends_with($request->host(), '.on-vapor.com')) {
80+
$request->headers->remove('X-Forwarded-Host');
81+
}
82+
7883
if ($trustedIps === '*' || $trustedIps === '**') {
7984
return $this->setTrustedProxyIpAddressesToTheCallingIp($request);
8085
}

0 commit comments

Comments
 (0)