The current middleware was behaving unexpectedly with the current matcher array. The documentation was not clear that the array represents a logical OR between matchers and not a logical AND. The matchers were originally seperated for readability but have now been combined to ensure proper functionality.
Discovered because favicon.ico was having a language parameter added to it's path by the middleware which in turn caused the browser to receive a 404 when requesting the redirected path.
Test instructions | Instructions pour tester la modification
Open browser and navigate to the site.
Ensure favicon is displayed in the browser tab.
Pull Request Checklist
Please complete the following items in the checklist before you request a review:
[ ] Have you completely tested the functionality of change introduced in this PR? Is the PR solving the problem it's meant to solve within the scope of the related issue?
[ ] The PR does not introduce any new issues such as failed tests, console warnings or new bugs.
[ ] If this PR adds a package have you ensured its licensed correctly and does not add additional security issues?
[ ] Is the code clean, readable and maintainable? Is it easy to understand and comprehend.
[ ] Does your code have adequate comprehensible comments? Do new functions have docstrings?
[ ] Have you modified the change log and updated any relevant documentation?
[ ] Is there adequate test coverage? Both unit tests and end-to-end tests where applicable?
[ ] If your PR is touching any UI is it accessible? Have you tested it with a screen reader? Have you tested it with automated testing tools such as axe?
Summary | Résumé
The current middleware was behaving unexpectedly with the current matcher array. The documentation was not clear that the array represents a logical OR between matchers and not a logical AND. The matchers were originally seperated for readability but have now been combined to ensure proper functionality.
Discovered because
favicon.ico
was having a language parameter added to it's path by the middleware which in turn caused the browser to receive a 404 when requesting the redirected path.Test instructions | Instructions pour tester la modification
Pull Request Checklist
Please complete the following items in the checklist before you request a review: