diff --git a/backend/open_webui/utils/security_headers.py b/backend/open_webui/utils/security_headers.py index 69a464814..a656b2935 100644 --- a/backend/open_webui/utils/security_headers.py +++ b/backend/open_webui/utils/security_headers.py @@ -60,7 +60,7 @@ def set_hsts(value: str): pattern = r"^max-age=(\d+)(;includeSubDomains)?(;preload)?$" match = re.match(pattern, value, re.IGNORECASE) if not match: - return "max-age=31536000;includeSubDomains" + value = "max-age=31536000;includeSubDomains" return {"Strict-Transport-Security": value}