export default { async fetch(request) { const url = new URL(request.url); const path = url.pathname.substring(1); const links = { "test": "https://google.com" }; if (links[path]) { return Response.redirect( links[path], 302 ); } return new Response( "Short link not found", { status: 404 } ); } }