Skip to content

Instantly share code, notes, and snippets.

@AronNovak
Created October 4, 2018 12:04
Show Gist options
  • Save AronNovak/2397bc89420c757623994a9b8904f6f7 to your computer and use it in GitHub Desktop.
Save AronNovak/2397bc89420c757623994a9b8904f6f7 to your computer and use it in GitHub Desktop.
cloudflare + pantheon
<?php
// https://pantheon.io/docs/client-ip/
$remote_ip = isset($_SERVER["HTTP_CF_CONNECTING_IP"]) ? $_SERVER["HTTP_CF_CONNECTING_IP"] : $_SERVER["REMOTE_ADDR"];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment