From de1649fdfeaca3cf2c3d496c42e57c3d610c0d05 Mon Sep 17 00:00:00 2001 From: Pavel Loginov Date: Wed, 15 Sep 2021 13:33:30 +0600 Subject: [PATCH] v5.2.6.0 Changelog: https://haproxy-wi.org/changelog.py#5_2_6 --- app/funct.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/funct.py b/app/funct.py index 5fd08d57..a76cc195 100644 --- a/app/funct.py +++ b/app/funct.py @@ -9,8 +9,8 @@ def is_ip_or_dns(server_from_request: str) -> str: ip_regex = "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$" dns_regex = "^(?!-)[A-Za-z0-9-]+([\\-\\.]{1}[a-z0-9]+)*\\.[A-Za-z]{2,6}$" try: - if server_from_request == 'roxy-wi-keep_alive': - return 'roxy-wi-keep_alive' + if 'roxy-wi' in server_from_request: + return server_from_request if re.match(ip_regex, server_from_request): return server_from_request else: