Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
26 views

I am working on a project using Next.js (App Router) and AWS Amplify Auth. I have implemented middleware to restrict access and redirect users based on a custom Cognito attribute (custom:...
Leo.roxy's user avatar
0 votes
1 answer
52 views

I'm using next-auth with middleware.ts in a Next.js App Router project. Despite putting middleware.ts at the root of the project, it is not being triggered, and protected routes like /profile are ...
Maryem Hadj Wannes's user avatar
0 votes
1 answer
88 views

this works really well to do lazy loading to make a performant SPA: import dynamic from 'next/dynamic'; const DynamicComponents: Record<string, React.ComponentType<ComponentProps<any>>&...
Alexander Mills's user avatar
0 votes
1 answer
60 views

I have a middleware.ts file defined in my nextjs app. In it I am able to set necessary things like authentication, etc. I would like to also check the results of my request. I cannot seem to find a ...
corsiKa's user avatar
  • 82.8k
0 votes
0 answers
290 views

i am facing an issue in my next js middleware.ts. this is my config: middleware.ts import type { NextRequest } from 'next/server'; import { NextResponse } from 'next/server'; import { config as ...
MehrdadR's user avatar
0 votes
0 answers
21 views

So I have a lot of internal i18n URLs and I created a function for generating those URLs.. and then used it in middleware mathcer like this: export const config = { matcher: [ '/((?!_next|...
Odif Yltsaeb's user avatar
  • 5,686