You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat(middleware): augments / matcher with /index
* fix(#39396): not invoked with i18n and trailingSlash
* add test case
* tweak matcher a bit and add tests
Co-authored-by: JJ Kasper <jj@jjsweb.site>
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Verify canary release
Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #45~20.04.1-Ubuntu SMP Mon Apr 4 09:38:31 UTC 2022
Binaries:
Node: 14.19.3
npm: 6.14.17
Yarn: 1.22.19
pnpm: N/A
Relevant packages:
next: 12.2.4
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
Describe the Bug
It seems like the middleware
matcher
does not match the homepage route / iftrailingSlash
is set totrue
along with some i18n config.next.config.js
along with the following middleware matcher
Expected Behavior
When matcher is set to
"/"
the middleware should kick in on the homepage.Link to reproduction
https://codesandbox.io/s/serene-morning-fd1cr1?file=/middleware.ts
To Reproduce
console.log
in thereThe text was updated successfully, but these errors were encountered: