Created
April 23, 2013 17:15
-
-
Save msurguy/5445542 to your computer and use it in GitHub Desktop.
HTTPS filter for laravel
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
Route::filter('https', function() { | |
if (Request::env()=='production'){ | |
if (!Request::secure()) return Redirect::to_secure(URI::current(), 301); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment