From dcabcac106ffb5f2f5df1a6f620f5f7f06ed20d2 Mon Sep 17 00:00:00 2001 From: Catherine Date: Mon, 29 Sep 2025 01:47:13 +0000 Subject: [PATCH] Rename feature `h2c` to `serve-h2c`. --- conf/Caddyfile | 2 +- src/main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/Caddyfile b/conf/Caddyfile index 7d5b4af..4f94eff 100644 --- a/conf/Caddyfile +++ b/conf/Caddyfile @@ -68,7 +68,7 @@ on_demand } - @h2c `{env.PAGES_FEATURES}.matches(r"\bh2c\b")` + @h2c `{env.PAGES_FEATURES}.matches(r"\bserve-h2c\b")` reverse_proxy @h2c h2c://{$GIT_PAGES_ADDRESS:localhost}:3000 reverse_proxy http://{$GIT_PAGES_ADDRESS:localhost}:3000 diff --git a/src/main.go b/src/main.go index 5b636c1..277f933 100644 --- a/src/main.go +++ b/src/main.go @@ -63,7 +63,7 @@ func serve(listener net.Listener, handler http.Handler) { server := http.Server{Handler: handler} server.Protocols = new(http.Protocols) server.Protocols.SetHTTP1(true) - if config.Feature("h2c") { + if config.Feature("serve-h2c") { server.Protocols.SetUnencryptedHTTP2(true) } log.Fatalln(server.Serve(listener))