Commit c457a93d authored by Taylor Otwell's avatar Taylor Otwell

Work on 401 response from filter.

parent d286d941
......@@ -37,9 +37,14 @@ Route::filter('auth', function()
{
if (Auth::guest())
{
if (Request::ajax()) App::abort(401);
return Redirect::guest('login');
if (Request::ajax())
{
return Response::make('Unauthorized', 401);
}
else
{
return Redirect::guest('login');
}
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment