|
@@ -88,3 +88,17 @@ if ( !defined('ABSPATH') )
|
|
|
|
|
|
/** Sets up WordPress vars and included files. */
|
|
/** Sets up WordPress vars and included files. */
|
|
require_once(ABSPATH . 'wp-settings.php');
|
|
require_once(ABSPATH . 'wp-settings.php');
|
|
|
|
+
|
|
|
|
+/*
|
|
|
|
+ http://cmanios.wordpress.com/2014/04/12/nginx-https-reverse-proxy-to-wordpress-with-apache-http-and-different-port/
|
|
|
|
+ http://wordpress.org/support/topic/compatibility-with-wordpress-behind-a-reverse-proxy
|
|
|
|
+ */
|
|
|
|
+// 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'];
|
|
|
|
+
|
|
|
|
+ if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
|
|
|
|
+ $_SERVER['HTTPS']='on';
|
|
|
|
+}
|
|
|
|
+
|