Framework: WithoutMiddleware doesn't work on global middleware

Created on 15 Apr 2020  路  4Comments  路  Source: laravel/framework


  • Laravel Version: 7.6.1
  • PHP Version: 7.3.16
  • Database Driver & Version: N/A

Description:

A recent commit added the option to skip/disable middleware for specific routes, which works for Route Groups and the like, but the implementation for global middleware doesn't actually check for it yet. I'm willing to look into a fix for this, but wanted to raise an issue first to check if such a fix would be welcome.

Steps To Reproduce:

Require a Auth middleware for all your routes in the App\Http\Kernel, try to call ->withoutMiddleware on login.

bug

Most helpful comment

@driesvints , @dsazup thanks for the feedback, I'd love to work on a PR for this tonight, will keep you both in the loop.

All 4 comments

I'm not sure if it was intended to skip global middleware. You're free to attempt a pr however.

Heya. I'm gonna re-open this as it indeed seems to be expected to work with global middleware as well. Thanks for reporting.

@driesvints , @dsazup thanks for the feedback, I'd love to work on a PR for this tonight, will keep you both in the loop.

Closing this as the PR was rejected. Please see the explanation by Taylor here: https://github.com/laravel/framework/pull/32404#issuecomment-614808543

Was this page helpful?
0 / 5 - 0 ratings

Related issues

digirew picture digirew  路  3Comments

SachinAgarwal1337 picture SachinAgarwal1337  路  3Comments

RomainSauvaire picture RomainSauvaire  路  3Comments

klimentLambevski picture klimentLambevski  路  3Comments

ghost picture ghost  路  3Comments