Last active
August 29, 2015 14:06
-
-
Save jbroadway/9a18f84ad6be671eb22d to your computer and use it in GitHub Desktop.
Bootstrap file for the Elefant CMS to hide a site behind HTTP Basic auth.
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 | |
/** | |
* Implements HTTP Basic auth to hide your site | |
* until it's ready to go live. Based on: | |
* | |
* https://gist.github.com/jbroadway/9a18f84ad6be671eb22d | |
*/ | |
if (! $controller->cli) { | |
conf ('General', 'master_username', 'USERNAME'); | |
conf ('General', 'master_password', 'PASSWORD'); | |
if (! simple_auth ()) { | |
die ('Unauthorized'); | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment