Skip to content

Instantly share code, notes, and snippets.

@kadai kadai/wp-config.php
Created May 17, 2018

Embed
What would you like to do?
<?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
You can’t perform that action at this time.