Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save hawkidoki/d6609ef83941911b70ad09e62737b58b to your computer and use it in GitHub Desktop.
Save hawkidoki/d6609ef83941911b70ad09e62737b58b to your computer and use it in GitHub Desktop.
<?php
if( (isset($_SERVER['HTTP_CF_VISITOR']) && (strpos($_SERVER['HTTP_CF_VISITOR'], 'https') !== false)) || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)) )
$_SERVER['HTTPS'] = 'on';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment