-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
fix(core): prevent exclude method from overwriting previous calls #13614
fix(core): prevent exclude method from overwriting previous calls #13614
Conversation
Pull Request Test Coverage Report for Build 5967bb56-11c2-444f-9474-e996881d3e45Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No comment
Can not use terminal to sudo |
Hello @ajlchiban, Thank you for your response. Did you mean that you couldn't use the terminal to run sudo commands in the CodeSandbox? I thought anyone could use the terminal to sudo by forking the public project. To avoid any confusion, I've added a minimum reproduction repository on GitHub as well. |
lgtm |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
Summary:
Previously, calling multiple
exclude
method inMiddlewareConsumer
overwrote the previously excluded routes.It only worked well when using a single
exclude
method.I created a minimum reproduction repository.
Both repositories contain the same code. You can review the test code (
exclude-middleware.spec.ts
) and see the results by cloning or forking the repository and runningnpm run test
.What is the new behavior?
This change ensures that the
exclude
method appends new routes to the existing excluded routes list instead of overwriting them.This preserves all previous exclude calls and maintains the intended behavior of accumulating excluded routes.
Does this PR introduce a breaking change?
Other information