Commit be919f68 authored by Łukasz Nowak's avatar Łukasz Nowak

caddy-frontend: Allow to globally disable HTTP2

One of solutions for random 502 errors from caddy is to fully disable
HTTP2 protocol ( https://github.com/mholt/caddy/issues/1080 )

We run Caddy with HTTP2 enabled by default, as we can enable/disable it per
each slave, but in some environments it might be just better to fully avoid
HTTP2 codepaths in Caddy.
parent ea259373
......@@ -14,7 +14,7 @@
# not need these here).
[template]
filename = instance.cfg.in
md5sum = d43a1631bcd0f4307507268a06f0fac2
md5sum = de7e30546a952e306e2a74f8492ab419
[template-common]
filename = instance-common.cfg.in
......@@ -22,7 +22,7 @@ md5sum = c801b7f9f11f0965677c22e6bbe9281b
[template-apache-frontend]
filename = instance-apache-frontend.cfg.in
md5sum = db61a7c0aadba180b7aec6056d2c0019
md5sum = 8b8fa3b9b080f14ca7ee2a010889a7dc
[template-apache-replicate]
filename = instance-apache-replicate.cfg.in
......
......@@ -258,7 +258,9 @@ environment =
command-line = {{ parameter_dict['caddy'] }}
-conf ${dynamic-caddy-frontend-template:rendered}
-log stdout
{% if instance_parameter['configuration.global-disable-http2'].lower() not in TRUE_VALUES %}
-http2=true
{% endif %}
{% if instance_parameter['configuration.enable-quic'].lower() in TRUE_VALUES %}
-quic
{% endif %}
......@@ -716,7 +718,9 @@ environment =
command-line = {{ parameter_dict['caddy'] }}
-conf ${dynamic-nginx-frontend-template:rendered}
-log stdout
{% if instance_parameter['configuration.global-disable-http2'].lower() not in TRUE_VALUES %}
-http2=true
{% endif %}
-grace {{ instance_parameter['configuration.mpm-graceful-shutdown-timeout'] }}s
-disable-http-challenge
-disable-tls-sni-challenge
......
......@@ -45,6 +45,16 @@
"title": "Enable HTTP2 by Default",
"type": "string"
},
"global-disable-http2": {
"default": "false",
"description": "Disables globally HTTP2 in Caddy, thus enable-http2-by-default here and enable-http2 have no effect. Rational is that in some loaded environments it is better to run Caddy without any HTTP2 capabilities.",
"enum": [
"true",
"false"
],
"title": "Globally disable HTTP2",
"type": "string"
},
"mpm-graceful-shutdown-timeout": {
"default": 5,
"description": "Value passed to -grace parameter of Caddy, see https://caddyserver.com/docs/cli .",
......
......@@ -97,6 +97,7 @@ configuration.trafficserver-autoconf-port = 8083
configuration.trafficserver-mgmt-port = 8084
configuration.re6st-verification-url = http://[2001:67c:1254:4::1]/index.html
configuration.enable-http2-by-default = true
configuration.global-disable-http2 = false
configuration.enable-quic = false
configuration.mpm-graceful-shutdown-timeout = 5
configuration.monitor-httpd-port = 8072
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment