first I want to specify our architecture. Client -> Grpc Gateway -> Server In our architecture, we use a gateway to process and authenticate requests and then pass it to the Server application. in the Grpc Gateway, we use alice package to chain some middlewares. here I have 2 questions.
- what happens to the context of each request that passes to the next middleware? does the second middleware has the passed context from the first middleware in its request Header(I mean req.Header) or in its request Context object? (I mean req.Context())
- what happens to the Server application request, when we send some request with Context object in Go (I mean req.WithContext(ctx))? does the context containment go into the request Header? if the answer is no, then what happens to the Context?
In my Server application, I try to log the context of the request but I don't get anything worthy and comparable to what I send from Grpc Gateway. So I'm confused now. I appreciate any kind of notion. Thanks