Last active
September 4, 2020 07:09
-
-
Save rwaddin/0b0e8349a1c2f87f774718406d9d2ec0 to your computer and use it in GitHub Desktop.
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 | |
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on"){ | |
$config['base_url'] = "https://".$_SERVER['HTTP_HOST']; | |
}else{ | |
$httphost = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : ""; | |
if(isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == "https"){ | |
$config['base_url'] = "https://".$httphost; | |
}else{ | |
$config['base_url'] = "http://".$httphost; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment