caddyhttp: clarify WebTransportServer doc covers both disabled paths

WebTransportServer returns nil for two distinct configurations:
EnableWebTransport=false on the server, and HTTP/3 not in use. The
prior doc only mentioned the latter. Spell out both, per review.
This commit is contained in:
tomholford 2026-05-05 18:23:39 -07:00
parent a9df860863
commit 0ccf820f87

View file

@ -1196,7 +1196,8 @@ func (s *Server) Name() string { return s.name }
// WebTransportServer returns the server's underlying WebTransport
// serving state as an opaque value. Modules that import
// github.com/quic-go/webtransport-go may type-assert it to
// *webtransport.Server. Returns nil if HTTP/3 is not in use.
// *webtransport.Server. Returns nil if WebTransport is not enabled
// on this server (EnableWebTransport=false or HTTP/3 is not in use).
//
// This is exposed as any so caddyhttp's public API does not leak the
// upstream webtransport-go type to packages that don't use it.