nginx proxy

This commit is contained in:
Mike Jolley 2012-04-23 13:41:11 +01:00
parent e0cfb04962
commit 9392908456
1 changed files with 6 additions and 0 deletions

View File

@ -377,6 +377,12 @@ class Woocommerce {
if ( isset( $_SERVER['QUERY_STRING'] ) )
$_SERVER['REQUEST_URI'].='?'.$_SERVER['QUERY_STRING'];
}
// NGINX Proxy
if ( ! isset( $_SERVER['REMOTE_ADDR'] ) && isset( $_SERVER['HTTP_REMOTE_ADDR'] ) )
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_REMOTE_ADDR'];
if ( ! isset( $_SERVER['HTTPS'] ) && ! empty( $_SERVER['HTTP_HTTPS'] ) )
$_SERVER['HTTPS'] = $_SERVER['HTTP_HTTPS'];
}
/**