فهرست منبع

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
 // If WordPress is behind reverse proxy
 // which proxies https to http
 // which proxies https to http
 if (!empty( $_SERVER['HTTP_X_FORWARDED_FOR'])) {
 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')
     if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
         $_SERVER['HTTPS']='on';
         $_SERVER['HTTPS']='on';
 }
 }
-