diff --git a/nginx_configurator/certs.py b/nginx_configurator/certs.py index 4c98384..d6fcf8e 100644 --- a/nginx_configurator/certs.py +++ b/nginx_configurator/certs.py @@ -51,7 +51,7 @@ def gather_autossl_directives(nginx_conf: Path): f"Cannot get SSL cert for \"{''.join(domains)}\". Invalid domains." ) - if not re.match(r"^[a-zA-Z0-9-_]$", alias): + if not re.match(r"^[a-zA-Z0-9-_]+$", alias): raise ValueError(f'Invalid cert alias "{alias}"') directives.append((domains, alias))