hono icon indicating copy to clipboard operation
hono copied to clipboard

`Internal Server Error` happened to Cloudflare Workers with cf official redirect

Open fdkevin0 opened this issue 2 years ago • 6 comments

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' }
  })
})

fdkevin0 avatar Oct 13 '22 17:10 fdkevin0