Open MrSquaare opened 5 days ago
This seems expected: https://github.com/honojs/middleware/blob/2d1a89df26f2ec42e1dc0e5845cf691bdcbe23e2/packages/zod-openapi/src/index.ts#L440-L441
Middlewares are loaded before validators
What's the best way to handle my problem?
Hi,
I'm trying to create a middleware that will retrieve the headers according to how they were described by the zod schema. So I'm using
c.req.valid("header")
. However, this method returns undefined in the middleware, where it would return the correct values in the handler.Here's some reproduction code:
Output: