Reputation: 13547
I am trying to get the opposite of this:
Route::filter('force.ssl', function()
{
if( ! Request::secure())
{
return Redirect::secure(Request::path());
}
});
I have this:
Route::filter('no.ssl', function()
{
if( Request::secure())
{
// return ???
}
});
How do you make a URL not secure in laravel?
Upvotes: 0
Views: 135
Reputation: 4421
The Redirect
facade has a to
method that accepts a secure flag as its optional fourth argument. Therefore this should do what you need:
return Redirect::to(Request::path(), null, null, false);
Upvotes: 2