Reverse Proxy Conditional
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Conditional to check if we're being served via the Reverse Proxy. | |
* The URL for the Forwarded Server below (example.com) should be the final | |
* URL for the site using the Reverse Proxy. | |
*/ | |
function lc_is_reverse_proxy() { | |
if ( 'www.example.com' === $_SERVER['HTTP_X_FORWARDED_SERVER'] ) { | |
return true; | |
} else { | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment