Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 12, 10:45 UTC
reverseproxy: Wire up TLS options for H3 transport
Matthew Holt committed
Jun 28, 2024 at 12:15 UTC
f8861ca16bd475e8519e7dbf5a2b55e81b329874
1 file changed
+7
modules/caddyhttp/reverseproxy/httptransport.go
+7
@@ -363,6 +363,13 @@ func (h *HTTPTransport) NewTransport(caddyCtx caddy.Context) (*http.Transport, e
363
// site owners control the backends), so it must be exclusive
364
if len(h.Versions) == 1 && h.Versions[0] == "3" {
365
h.h3Transport = new(http3.RoundTripper)
366
+ if h.TLS != nil {
367
+ var err error
368
+ h.h3Transport.TLSClientConfig, err = h.TLS.MakeTLSClientConfig(caddyCtx)
369
+ if err != nil {
370
+ return nil, fmt.Errorf("making TLS client config for HTTP/3 transport: %v", err)
371
+ }
372
+ }
373
} else if len(h.Versions) > 1 && sliceContains(h.Versions, "3") {
374
return nil, fmt.Errorf("if HTTP/3 is enabled to the upstream, no other HTTP versions are supported")
375
}