Skip to content

Commit aa09d60

Browse files
committed
gateway: remove alt-svc header from response
1 parent d77da54 commit aa09d60

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

gateway/tunnel.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ func (g *Gateway) tunnelHandler() http.Handler {
4141
BufferPool: newBufferPool(),
4242
ErrorHandler: g.errorHandler,
4343
ModifyResponse: func(r *http.Response) error {
44-
// This is only used for metrics, no modification to the response will be done
44+
// since visitor and client shares the same port, proxied target may have
45+
// alt-svc set in their response, which will either break peer quic,
46+
// or the visitor won't be able to visit
47+
r.Header.Del("alt-svc")
4548
profiler.GatewayRequests.WithLabelValues("success", "forward").Add(1)
4649
return nil
4750
},

0 commit comments

Comments
 (0)