Vercel / Nextjs middleware request object is just a string

Viewed 80

I have a nextjs / vercel middleware that looks like this:

import { NextResponse, type NextRequest } from "next/server";

export function middleware(req: NextRequest) {
    console.log('test----> ', req)
  return NextResponse.next();
}

I expect this to log some info about the request, but instead it just logs this string,

test---->  { sourcePage: '/src/middleware' }

what is going on here?

0 Answers
Related