Skip to content

Commit

Permalink
adds host header from url
Browse files Browse the repository at this point in the history
  • Loading branch information
denis-mitr committed May 9, 2024
1 parent 6652ec9 commit e5c3b3b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ func handleGRPCWeb(
// Tell the server we would accept trailers (the gRPC server currently (v1.29.1) doesn't check for this, but it
// really should, as the purpose of the TE header according to the gRPC spec is to detect incompatible proxies).
req.Header.Set("TE", "trailers")
req.Header.Set("Host", req.URL.Host)

// Downgrade response to gRPC web.
transcodingWriter, finalize := grpcweb.NewResponseWriter(w)
Expand Down

0 comments on commit e5c3b3b

Please sign in to comment.