You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I have a small middleware that reads the cookie and writes a "User-Id" header through the context, but when I try to read the same header in the handler or in the next middleware, it remains empty
@spa5k if you must override headers in router-agnostic middleware, you can create your own struct which wraps huma.Context and override yourStruct.Header(name string) string to return the values you want. Otherwise, like @x-user says you can do this in the underlying router's own middlewares.
So I have a small middleware that reads the cookie and writes a "User-Id" header through the context, but when I try to read the same header in the handler or in the next middleware, it remains empty
Passing values through context is working as expected.
The text was updated successfully, but these errors were encountered: