diff --git a/ncc/certs.py b/ncc/certs.py index 7818880..0e3ab99 100644 --- a/ncc/certs.py +++ b/ncc/certs.py @@ -15,8 +15,8 @@ ssl_certificate_key $keypath; ssl_certificate $certpath; """.lstrip() SERVER_BLOCK_RE = re.compile(r"(?:^|[{};])\s*server\s*{", re.MULTILINE) -INCLUDE_RE = re.compile(r"(?:^|[{};])\s*include\s+([^;]+);", re.MULTILINE) -SERVER_NAME_RE = re.compile(r"(?:^|[{};])\s*server_name\s+([^;]+);", re.MULTILINE) +INCLUDE_RE = re.compile(r"(?:^|[{};])\s*include\s+([^;]+)(?=;)", re.MULTILINE) +SERVER_NAME_RE = re.compile(r"(?:^|[{};])\s*server_name\s+([^;]+)(?=;)", re.MULTILINE) class ConfigError(Exception):