Yusuke Wada

Results 1706 comments of Yusuke Wada

And, this also works fine: ![SS](https://user-images.githubusercontent.com/10682/193307060-b9154c8a-588c-422c-b2c6-634b5881a8e6.png)

Like this?: ![SS](https://user-images.githubusercontent.com/10682/193308081-0359a394-54d3-4b89-ae65-79d542e22402.png)

Your writing is wrong. The correct version is as follows. ```ts const app = new Hono() const middleware = (): MiddlewareHandler => { return async (c, next) => { await...

Hmm, it works: ![SS](https://user-images.githubusercontent.com/10682/193320091-d0489b3f-0c8e-4ea6-9957-0d80367fb1ba.png) Please show me your code and tell me if your environment is Cloudflare Workers, Deno, Bun or Node.js?

I found one of the causes: the Serve Static implementation in Bun and Node.js was wrong. Calling `c.res` would initialize the Response in the Context. https://github.com/honojs/node-server/blob/433695a0a5a74992cf177c3b2dfa8a39f0d66211/src/serve-static.ts#L16 It's not expected behavior....

> Does that mean that this issue may actually have actually been an issue with the Bun implementation in @mashaal 's case? I don't know. The above fix resolved the...

Hi @CaptainYarb ! We can write it as just a handler: ```ts app.all('/favicon.ico', async (c) => { const res = await fetch('https://honojs.dev/favicon.ico') const newResponse = new Response(res.body, res) return newResponse...

It's an interesting idea, but I don't know how to implement it because the way to implement middleware is similar but different. I do not want to change the ecosystem...

That may be difficult, but it's a good theme. I'll give it some more thought.

It is certainly one way to use *zod*. However, I think it's difficult to make it `unknown` because there are use cases to use `parsedBody` directly not using a validator...