From e2a5e2293ab0b06e33445a1243f36cd5def1de42 Mon Sep 17 00:00:00 2001 From: Francis Lavoie Date: Fri, 12 Aug 2022 17:09:18 -0400 Subject: reverseproxy: Add `unix+h2c` Caddyfile network shortcut (#4953) --- modules/caddyhttp/reverseproxy/addresses.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'modules') diff --git a/modules/caddyhttp/reverseproxy/addresses.go b/modules/caddyhttp/reverseproxy/addresses.go index c161ed8..4da47fb 100644 --- a/modules/caddyhttp/reverseproxy/addresses.go +++ b/modules/caddyhttp/reverseproxy/addresses.go @@ -96,6 +96,12 @@ func parseUpstreamDialAddress(upstreamAddr string) (string, string, error) { } } + // special case network to support both unix and h2c at the same time + if network == "unix+h2c" { + network = "unix" + scheme = "h2c" + } + // for simplest possible config, we only need to include // the network portion if the user specified one if network != "" { -- cgit v1.2.3