import { ImageResponse } from '@vercel/og' import { NextRequest } from 'next/server' export const config = { runtime: 'experimental-edge', } export default async function handler(req: NextRequest) { const { searchParams } = req.nextUrl const username = searchParams.get('username') return new ImageResponse( (
{username ?

github.com/{username}

:

Visit with "?username=netlify"

}
), { width: 1200, height: 630, headers: { // By default this has an immutable cache, but this is for testing 'Cache-Control': 'public, max-age=0, must-revalidate', }, }, ) }