mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
- Edge Runtime was missing `globalThis.NEXT_CLIENT_ASSET_SUFFIX` at runtime - Prerenders were always running `globalThis.NEXT_CLIENT_ASSET_SUFFIX` set Fixups after #88828
14 lines
389 B
TypeScript
14 lines
389 B
TypeScript
import { NextRequest, NextResponse } from 'next/server'
|
|
|
|
// @ts-ignore
|
|
import imported from './public/vercel.png'
|
|
const url = new URL('./public/vercel.png', import.meta.url).toString()
|
|
|
|
export async function middleware(req: NextRequest) {
|
|
if (req.nextUrl.toString().endsWith('/middleware')) {
|
|
return Response.json({ imported: imported.src, url })
|
|
}
|
|
|
|
return NextResponse.next()
|
|
}
|