Parcourir la source

Host must be set to HTTP_X_FORWARDED_HOST

Girish Ramakrishnan il y a 10 ans
Parent
commit
f4cfe93a2d
1 fichiers modifiés avec 1 ajouts et 2 suppressions
  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';
 }
-