浏览代码

Host must be set to HTTP_X_FORWARDED_HOST

Girish Ramakrishnan 10 年之前
父节点
当前提交
f4cfe93a2d
共有 1 个文件被更改,包括 1 次插入2 次删除
  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';
 }
-