Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Cached middleware does not respect global middleware settings #135

Closed
2 tasks done
calvinalkan opened this issue May 6, 2022 · 1 comment
Closed
2 tasks done
Assignees
Labels
bug Something isn't working released

Comments

@calvinalkan
Copy link
Member

Thanks for taking the time to fill out this bug report!"

  • I have searched the issue tracker for similar issues
  • I have verified that the issue is present when using the most recent version of the affected package(s)

Which @snicco/* package(s) are the source of the bug?

http-routing

Is this a regression?

No

Composer dependencies

//

Current behaviour

When the middleware resolver is cached, any requests without a route match will have the "frontend|admin|api|global" group applied to it.

Expected behaviour

The "frontend|admin|api|global" group should only be applied if they are also configured to be run for every request.

How to reproduce

//

Possible solution

No response

Relevant log output

No response

Additional Context

No response

@calvinalkan calvinalkan added the bug Something isn't working label May 6, 2022
@calvinalkan calvinalkan self-assigned this May 6, 2022
calvinalkan added a commit that referenced this issue May 6, 2022
Middleware groups that are not in the "run_always"
configuration should not be in the generated
middleware cache.

If they are included in the middleware cache
every request without a route match
has the middleware applied even though
it should only be run for route matches.

Fix: #135
calvinalkan added a commit that referenced this issue May 6, 2022
@snicco-bot
Copy link
Collaborator

🎉 This issue has been resolved in version 1.1.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

No branches or pull requests

2 participants