]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: acme: the acme section is experimental
authorWilliam Lallemand <wlallemand@haproxy.com>
Wed, 9 Apr 2025 14:35:11 +0000 (16:35 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Fri, 11 Apr 2025 23:29:27 +0000 (01:29 +0200)
Allow the usage of the acme section only when
expose-experimental-directives is set.

src/acme.c

index 5d91c1b1bb0a9b69d7b73346fd6c57ddbb23c63b..86930045e6536431e06fcc4d91f963db29bb91f0 100644 (file)
@@ -116,6 +116,12 @@ static int cfg_parse_acme(const char *file, int linenum, char **args, int kwm)
        int err_code = 0;
        char *errmsg = NULL;
 
+       if (!experimental_directives_allowed) {
+               ha_alert("parsing [%s:%d]: section '%s' is experimental, must be allowed via a global 'expose-experimental-directives'\n", file, linenum, cursection);
+               err_code |= ERR_ALERT | ERR_FATAL;
+               goto out;
+       }
+
        if (strcmp(args[0], "acme") == 0) {
                struct acme_cfg *tmp_acme = acme_cfgs;