diff options
author | Matthew Holt <[email protected]> | 2022-08-29 12:31:53 -0600 |
---|---|---|
committer | Matthew Holt <[email protected]> | 2022-08-29 12:31:56 -0600 |
commit | 8cb3cf540c2d083721a1717b9ddf2657b7eb5102 (patch) | |
tree | d196a055c3301b3aef1960d980cda0d1888dd825 /modules/caddyhttp/reverseproxy/reverseproxy.go | |
parent | e1801fdb19988a319fdc174ad39391e1a1c12f54 (diff) | |
download | caddy-8cb3cf540c2d083721a1717b9ddf2657b7eb5102.tar.gz caddy-8cb3cf540c2d083721a1717b9ddf2657b7eb5102.zip |
Minor cleanup, resolve a couple lint warnings
Diffstat (limited to 'modules/caddyhttp/reverseproxy/reverseproxy.go')
-rw-r--r-- | modules/caddyhttp/reverseproxy/reverseproxy.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/caddyhttp/reverseproxy/reverseproxy.go b/modules/caddyhttp/reverseproxy/reverseproxy.go index 994365130..b806ddac4 100644 --- a/modules/caddyhttp/reverseproxy/reverseproxy.go +++ b/modules/caddyhttp/reverseproxy/reverseproxy.go @@ -46,7 +46,9 @@ import ( var supports1xx bool func init() { - supports1xx = !regexp.MustCompile(`^go1\.1(?:7|8)\.`).Match([]byte(runtime.Version())) + // Caddy requires at least Go 1.18, but Early Hints requires Go 1.19; thus we can simply check for 1.18 in version string + // TODO: remove this once our minimum Go version is 1.19 + supports1xx = !strings.Contains(runtime.Version(), "go1.18") caddy.RegisterModule(Handler{}) } |