From 107aa76bcf5d5599460fdce61dfa15bb147acc62 Mon Sep 17 00:00:00 2001 From: Adam Zapletal Date: Fri, 23 Feb 2024 22:36:15 -0600 Subject: Fixed #29022 -- Fixed handling protocol-relative URLs in ManifestStaticFilesStorage when STATIC_URL is set to /. --- django/contrib/staticfiles/storage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'django') diff --git a/django/contrib/staticfiles/storage.py b/django/contrib/staticfiles/storage.py index 85172ea42d..191fe3cbb5 100644 --- a/django/contrib/staticfiles/storage.py +++ b/django/contrib/staticfiles/storage.py @@ -221,7 +221,7 @@ class HashedFilesMixin: url = matches["url"] # Ignore absolute/protocol-relative and data-uri URLs. - if re.match(r"^[a-z]+:", url): + if re.match(r"^[a-z]+:", url) or url.startswith("//"): return matched # Ignore absolute URLs that don't point to a static file (dynamic -- cgit v1.3