Last active
December 11, 2015 16:08
-
-
Save devyfriend/4625062 to your computer and use it in GitHub Desktop.
modified codeigniter config file, useful to detect the server in http or https, especialy when the app is inside an iframe
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
$referer = isset($_SERVER['HTTP_REFERER']) ? parse_url($_SERVER['HTTP_REFERER']) : false; | |
$scheme = isset($referer['scheme']) ? $referer['scheme'] : 'http'; | |
$config['base_url'] = $scheme.'://'.$_SERVER['HTTP_HOST'].'/'; | |
$config['scheme_url'] = $scheme; | |
$config['asset_url'] = $config['base_url'].'assets/'; | |
$config['index_page'] = ''; // empty it |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment