We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e59345 commit 5845c4eCopy full SHA for 5845c4e
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