Created
January 20, 2016 13:00
-
-
Save ThijsFeryn/6d5188923963ed50c71d to your computer and use it in GitHub Desktop.
Print custom headers set by Varnish to display the different IP's and print the X-Forwarded-For header
This file contains hidden or 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 | |
echo "Client IP: " . $_SERVER["HTTP_X_CLIENTIP"]. "<br />".PHP_EOL; | |
echo "Server IP: " . $_SERVER["HTTP_X_SERVERIP"]. "<br />".PHP_EOL; | |
echo "Local IP: " . $_SERVER["HTTP_X_LOCALIP"]. "<br />".PHP_EOL; | |
echo "Remote IP: " . $_SERVER["HTTP_X_REMOTEIP"]. "<br />".PHP_EOL; | |
echo "X-Forwarded-For: " . $_SERVER["HTTP_X_FORWARDED_FOR"]. "<br />".PHP_EOL; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment