redirect error vercel
Unanswered
Gazami crab posted this in #help-forum
Gazami crabOP
when i'm redirecting to page it always redirect me to the /home
this happens only on vercel, on my local development everything works fine
this is my middleware.ts
this happens only on vercel, on my local development everything works fine
export default withAuth({
callbacks: {
authorized({ token }) {
return !!token
},
},
pages: {
signIn: '/home',
signOut: '/',
error: '/',
},
})
export const config = { matcher: [
"/home",
"/character/(.*)",
"/admin/(.*)",
] }
this is my middleware.ts
3 Replies
Gazami crabOP
Oct 02 12:00:41.48
-
[REDACTED]
[GET] /character/new
false
Oct 02 12:00:41.48
-
[REDACTED]
[GET] /character/new
null
Oct 02 12:00:41.48
-
[REDACTED]
[GET] /character/new
authorized
Oct 02 12:00:41.48
307
[REDACTED]
[GET] /character/new
[GET] [middleware: "src/middleware"] /
-
[REDACTED]
[GET] /character/new
false
Oct 02 12:00:41.48
-
[REDACTED]
[GET] /character/new
null
Oct 02 12:00:41.48
-
[REDACTED]
[GET] /character/new
authorized
Oct 02 12:00:41.48
307
[REDACTED]
[GET] /character/new
[GET] [middleware: "src/middleware"] /
sometimes middleware token returns null
Gazami crabOP
fixed