Skip to content

Commit

Permalink
Fail if pre-route middleware fails.
Browse files Browse the repository at this point in the history
  • Loading branch information
incraigulous committed Mar 25, 2024
1 parent 75f03ef commit 579060f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Middleware/DispatchController.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ public function handle(Request $request, Response $response, $next)
->push(HandleRedirects::class)
->push(HandleErrors::class)
->run($request, $response);
if (! $response || ! $response->isSuccessful()) {
return $response;
}
}

//Call the controller method
Expand Down

0 comments on commit 579060f

Please sign in to comment.