Hostname with / is not hitting middleware.ts instead it is hitting [[..path.tsx]] #81493
Unanswered
9676-307031
asked this question in
Help
Replies: 1 comment 1 reply
-
Is middleware firing at all? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Hostname with / is not hitting middleware.ts instead it is hitting [[..path.txs]]
Let us take an example if I have a host name pws.d1.abc.com is not htting middleware else it si reaching pages/[...path.tsx] need help to hit middle ware . My middleware.ts
import type { NextRequest, NextFetchEvent } from 'next/server';
import middleware from 'lib/middleware';
// eslint-disable-next-line
export default async function (req: NextRequest, ev: NextFetchEvent) {
console.log('middleware', req.headers.get('host'));
return middleware(req, ev);
}
export const config = {
/*
/
matcher: ['/', '/((?!api/|_next/|healthz|sitecore/api/|-/|favicon.ico|sc_logo.svg).)'],
};
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions