mirror of
https://github.com/caddyserver/caddy.git
synced 2025-05-30 15:58:10 +08:00
httpserver: Add experimental H2C support (#3289)
* reverse_proxy: Initial attempt at H2C transport/client support (#3218) I have not tested this yet * Experimentally enabling H2C server support (closes #3227) See also #3218 I have not tested this * reverseproxy: Clean up H2C transport a bit * caddyhttp: Update godoc for h2c server; clarify experimental status * caddyhttp: Fix trailers when recording responses (fixes #3236) * caddyhttp: Tweak h2c config settings and docs
This commit is contained in:
@ -584,6 +584,7 @@ func (h *Handler) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
|
||||
// tls_trusted_ca_certs <cert_files...>
|
||||
// keepalive [off|<duration>]
|
||||
// keepalive_idle_conns <max_count>
|
||||
// versions <versions...>
|
||||
// }
|
||||
//
|
||||
func (h *HTTPTransport) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
|
||||
@ -701,6 +702,12 @@ func (h *HTTPTransport) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
|
||||
h.KeepAlive.MaxIdleConns = num
|
||||
h.KeepAlive.MaxIdleConnsPerHost = num
|
||||
|
||||
case "versions":
|
||||
h.Versions = d.RemainingArgs()
|
||||
if len(h.Versions) == 0 {
|
||||
return d.ArgErr()
|
||||
}
|
||||
|
||||
default:
|
||||
return d.Errf("unrecognized subdirective %s", d.Val())
|
||||
}
|
||||
|
Reference in New Issue
Block a user