Closed addlistener closed 6 months ago
I think you should be able to restrict the middleware to only your app router pages, using the matcher
config.
Thanks you! Though I have almost abandoned app router, I think you are leading me to a right direction.
I made app dir & pages dir work individually by following the guide. However my application contains both dir. Is it possible we do both?
If I have
nextConfig.i18n
&middleware.ts
at the same time -> "Too many redirects"If I have only
middleware.ts
-> Does not work for pages dir.