mirror of
https://codeberg.org/git-pages/git-pages.git
synced 2026-05-14 03:01:48 +00:00
Rename feature h2c to serve-h2c.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user