Created
May 17, 2018 02:52
-
-
Save kadai/014aac9f0e2ead95f9f958871d404301 to your computer and use it in GitHub Desktop.
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 | |
/* SI TENEMOS UN REDIRECTING LOOP CON CLOUDFLARE Y HTTPS */ | |
/* LE OBLIGAMOS AL SERVIDOR A "ACTIVAR" EL MODO HTTPS */ | |
define('FORCE_SSL_ADMIN', true); | |
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) | |
$_SERVER['HTTPS']='on'; | |
/* SI USAMOS CLOUDFLARE, USAMOS ESTO PARA RESTAURAR EL IP DEL VISITANTE */ | |
if ( !empty( $_SERVER['REMOTE_ADDR'] ) && !empty( $_SERVER['HTTP_CF_CONNECTING_IP'] ) ) | |
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP']; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment