diff --git a/p2p/transport/webtransport/listener.go b/p2p/transport/webtransport/listener.go index ca8fe1cf35..3ace1bab47 100644 --- a/p2p/transport/webtransport/listener.go +++ b/p2p/transport/webtransport/listener.go @@ -87,7 +87,10 @@ func newListener(laddr ma.Multiaddr, transport tpt.Transport, noise *noise.Trans serverClosed: make(chan struct{}), addr: udpConn.LocalAddr(), multiaddr: localMultiaddr, - server: webtransport.Server{H3: http3.Server{TLSConfig: tlsConf}}, + server: webtransport.Server{ + H3: http3.Server{TLSConfig: tlsConf}, + CheckOrigin: func(r *http.Request) bool { return true }, + }, } ln.ctx, ln.ctxCancel = context.WithCancel(context.Background()) mux := http.NewServeMux()