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
The context code looks correct, however (stream AskGPTResponse); requires you implement the full Interceptor interface. The current interceptor will only work on unary, it doesn't cover streaming use cases.
Would recommend to look at the authn-go library: https://github.com/connectrpc/authn-go/tree/main
This will correctly handle setting the context value in the request and has some security benefits doing this as HTTP middleware.
my middleware
in my api, i use token in http header to check if user is logged in.
and i use middleware to set the context, so i can get user_id easily in handler.
But in such rpc handler i can't get the user_id.
my proto
Do i need to change my middleware code? Thanks.
The text was updated successfully, but these errors were encountered: