Skip to content

Instantly share code, notes, and snippets.

@msurguy
Created April 23, 2013 17:15
Show Gist options
  • Save msurguy/5445542 to your computer and use it in GitHub Desktop.
Save msurguy/5445542 to your computer and use it in GitHub Desktop.
HTTPS filter for laravel
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