export async function onRequest({ request, next }) { const url = new URL(request.url); const legacyPath = url.pathname === '/waitlist' || url.pathname === '/waitlist/'; const alias = url.hostname === 'www.skillfarm.ai'; if (legacyPath || alias) { if (legacyPath) url.pathname = '/'; if (alias) url.hostname = 'skillfarm.ai'; return Response.redirect(url, 308); } return next(); }