Last active
December 18, 2015 20:49
-
-
Save jonlabelle/5843268 to your computer and use it in GitHub Desktop.
A Laravel 4 route filter that redirects an HTTP request to HTTPS.
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('scrf', function() | |
{ | |
if ( !Request::secure() ) return Redirect::secure( Request::path('/toSecureURL') ); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment