Browse Source

Host must be set to HTTP_X_FORWARDED_HOST

Girish Ramakrishnan 10 years ago
parent
commit
f4cfe93a2d
1 changed files with 1 additions and 2 deletions
  1. 1 2
      wp-config.php

+ 1 - 2
wp-config.php

@@ -96,9 +96,8 @@ require_once(ABSPATH . 'wp-settings.php');
 // If WordPress is behind reverse proxy
 // which proxies https to http
 if (!empty( $_SERVER['HTTP_X_FORWARDED_FOR'])) {
-    $_SERVER['HTTP_HOST'] = $_SERVER['HTTP_X_FORWARDED_FOR'];
+    $_SERVER['HTTP_HOST'] = $_SERVER['HTTP_X_FORWARDED_HOST'];
 
     if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
         $_SERVER['HTTPS']='on';
 }
-