We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2200268 + 5845c4e commit f0fba96Copy full SHA for f0fba96
1 file changed
includes/Forwarded_URLs.php
@@ -135,10 +135,10 @@ private function has_forwarded_host() {
135
public function get_forwarded_host() {
136
137
// are we using Forward HQ?
138
- $host = isset( $_SERVER['HTTP_X_FORWARDED_HOST'] ) ? $_SERVER['HTTP_X_FORWARDED_HOST'] : false;
+ $host = isset( $_SERVER['HTTP_X_FORWARDED_HOST'] ) ? $_SERVER['HTTP_X_FORWARDED_HOST'] : $_SERVER['HTTP_HOST'];
139
140
// if not, check if we're using ngrok
141
- $host = ! $host && isset( $_SERVER['HTTP_X_ORIGINAL_HOST'] ) ? $_SERVER['HTTP_X_ORIGINAL_HOST'] : $_SERVER['HTTP_HOST'];
+ $host = isset( $_SERVER['HTTP_X_ORIGINAL_HOST'] ) ? $_SERVER['HTTP_X_ORIGINAL_HOST'] : $host;
142
143
return $host;
144
}
0 commit comments