瀏覽代碼

Set SERVER_PORT

wp_siteurl is supposed to be the final say on the url but some
plugins like rsvp seem to use this value incorrectly.
Girish Ramakrishnan 7 年之前
父節點
當前提交
6285cb10b3
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      wp-config.php.template

+ 1 - 1
wp-config.php.template

@@ -57,7 +57,7 @@ define('WP_DEBUG_LOG', false);
 // 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_HOST'];
-    $_SERVER['SERVER_PORT'] = '80'; // pretend apache is running on port 80. plugins like rsvp use this
+    $_SERVER['SERVER_PORT'] = '443'; // pretend apache is running on port 443. plugins like rsvp use this
 
     if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
         $_SERVER['HTTPS']='on';