hono
hono copied to clipboard
`Internal Server Error` happened to Cloudflare Workers with cf official redirect
Codes following catch Internal Server Error
with Cloudflare Workers.
app.get('/', (c) => {
return Response.redirect('https://github.com')
})
But this piece of code with the same meaning can be successfully executed.
app.get('/', (c) => {
return new Response('', {
status: 302,
headers: { 'Location': 'https://github.com' }
})
})