Last active
December 17, 2015 17:19
-
-
Save hiraq/5645211 to your computer and use it in GitHub Desktop.
fix error redirect by referer, when running on proxy server (HTTP_X_FORWARDED_HOST has been set)
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 | |
/* | |
* fix redirect because proxy server | |
*/ | |
if (isset($_SERVER['HTTP_X_FORWARDED_HOST']) && !empty($_SERVER['HTTP_X_FORWARDED_HOST'])) { | |
$_SERVER['HTTP_X_FORWARDED_HOST'] = isset($_SERVER['HTTP_REFERER']) && !empty($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''; | |
} |
ah, you're right, your solution look better for me :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Or if you want to actually use the framework