Skip to content

Commit

Permalink
gateway: remove alt-svc header from response
Browse files Browse the repository at this point in the history
  • Loading branch information
zllovesuki committed Sep 13, 2021
1 parent d77da54 commit aa09d60
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gateway/tunnel.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ func (g *Gateway) tunnelHandler() http.Handler {
BufferPool: newBufferPool(),
ErrorHandler: g.errorHandler,
ModifyResponse: func(r *http.Response) error {
// This is only used for metrics, no modification to the response will be done
// since visitor and client shares the same port, proxied target may have
// alt-svc set in their response, which will either break peer quic,
// or the visitor won't be able to visit
r.Header.Del("alt-svc")
profiler.GatewayRequests.WithLabelValues("success", "forward").Add(1)
return nil
},
Expand Down

0 comments on commit aa09d60

Please sign in to comment.