middleware request url on standalone build for docker
Unanswered
English Spot posted this in #help-forum
English SpotOP
When having a middleware that uses NextResponse.redirect req.url is 0.0.0.0
eg: return NextResponse.redirect(new URL('/', request.url));
what is the magic that makes this work on vercel?
how should i mitigate against this?
my use case is:
in middleware.ts i use an auth check given the presence of a cookie redirects to an api route (to refresh token) or to login to provide credentials.
Thanks,
Cezar
eg: return NextResponse.redirect(new URL('/', request.url));
what is the magic that makes this work on vercel?
how should i mitigate against this?
my use case is:
in middleware.ts i use an auth check given the presence of a cookie redirects to an api route (to refresh token) or to login to provide credentials.
Thanks,
Cezar