Rename feature h2c to serve-h2c.

This commit is contained in:
Catherine
2025-09-29 01:47:13 +00:00
parent be389329f2
commit dcabcac106
2 changed files with 2 additions and 2 deletions

View File

@@ -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

View File

@@ -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))