refactor: Update BUNKERWEB_STATIC_INSTANCES_RX regex pattern to be more precise

This commit is contained in:
Théophile Diot 2024-08-08 17:20:33 +01:00
parent 247cf2b215
commit e85ed0940a
No known key found for this signature in database
GPG key ID: FA995104A0BA376A

View file

@ -21,7 +21,7 @@ from API import API # type: ignore
CUSTOM_CONF_RX = re_compile(
r"^(?P<service>[0-9a-z\.-]*)_?CUSTOM_CONF_(?P<type>HTTP|SERVER_STREAM|STREAM|DEFAULT_SERVER_HTTP|SERVER_HTTP|MODSEC_CRS|MODSEC|CRS_PLUGINS_BEFORE|CRS_PLUGINS_AFTER)_(?P<name>.+)$"
)
BUNKERWEB_STATIC_INSTANCES_RX = re_compile(r"(http://)?(?P<hostname>(?<![:@])\b[^:@\s]+\b)(:(?P<port>\d+))?")
BUNKERWEB_STATIC_INSTANCES_RX = re_compile(r"(http://)?(?P<hostname>(?<![:])\b[^:\s]+\b)(:(?P<port>\d+))?")
LOGGER = setup_logger("Generator", getenv("CUSTOM_LOG_LEVEL", getenv("LOG_LEVEL", "INFO")))