From 21501c7b93e45c5f47173a2d2aae502e00b81520 Mon Sep 17 00:00:00 2001 From: Wouter Depypere Date: Tue, 23 Mar 2021 16:36:30 +0100 Subject: [PATCH] ncm-metaconfig: httpd - add h2 options --- ncm-metaconfig/src/main/metaconfig/httpd/config/vhost.tt | 4 +++- ncm-metaconfig/src/main/metaconfig/httpd/pan/schema.pan | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ncm-metaconfig/src/main/metaconfig/httpd/config/vhost.tt b/ncm-metaconfig/src/main/metaconfig/httpd/config/vhost.tt index e12076c092..313bbc9895 100644 --- a/ncm-metaconfig/src/main/metaconfig/httpd/config/vhost.tt +++ b/ncm-metaconfig/src/main/metaconfig/httpd/config/vhost.tt @@ -11,7 +11,9 @@ hostnamelookups [% vhost.hostnamelookups ? "on" : "off" %] [% IF vhost.exists('limitrequestbody') %] limitrequestbody [% vhost.limitrequestbody %] [% END -%] - +[% IF vhost.exists('protocols') -%] +protocols [% vhost.protocols.join(' ') %] +[% END -%] [%- to_process = ['ssl', 'nss', 'env', 'aliases', 'rewrite', 'redirect', 'perl', 'wsgi', 'log', 'rails', 'browsermatch', 'passenger', 'oidc', 'header'] -%] [%- FOREACH p IN to_process -%] diff --git a/ncm-metaconfig/src/main/metaconfig/httpd/pan/schema.pan b/ncm-metaconfig/src/main/metaconfig/httpd/pan/schema.pan index b6103cf31b..f213e2255e 100644 --- a/ncm-metaconfig/src/main/metaconfig/httpd/pan/schema.pan +++ b/ncm-metaconfig/src/main/metaconfig/httpd/pan/schema.pan @@ -31,6 +31,8 @@ type httpd_nss_cipherstring = string with match(SELF, '^(-(rsa_3des_sha|rsa_des_ 'ecdhe_rsa_aes_256_sha|ecdhe_rsa_aes_256_sha_384|ecdh_rsa_aes_128_sha|ecdh_rsa_aes_256_sha|' + 'rsa_aes_128_gcm_sha_256|rsa_aes_128_sha|rsa_aes_256_gcm_sha_384|rsa_aes_256_sha))$'); +type httpd_protocols = choice("h2", "h2c", "http/1.1"); + @documentation{ Either all Options must start with + or -, or no Option may. } @@ -620,6 +622,7 @@ type httpd_vhost = { "browsermatch" ? httpd_browsermatch[] "passenger" ? httpd_passenger_vhost "header" ? httpd_header[] + "protocols" ? httpd_protocols[] }; # system wide settings