1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #32304 -- Fixed prefixing STATIC_URL and MEDIA_URL by SCRIPT_NAME for absolute URLs with no domain.

Thanks Adam Hooper for the report.

Regression in c574bec092.
This commit is contained in:
Mariusz Felisiak
2020-12-31 13:18:57 +01:00
committed by GitHub
parent a2e3f95b09
commit e13b71403b
3 changed files with 12 additions and 11 deletions

View File

@@ -573,10 +573,12 @@ class MediaURLStaticURLPrefixTest(SimpleTestCase):
set_script_prefix(val)
def test_not_prefixed(self):
# Don't add SCRIPT_NAME prefix to valid URLs, absolute paths or None.
# Don't add SCRIPT_NAME prefix to absolute paths, URLs, or None.
tests = (
'/path/',
'http://myhost.com/path/',
'http://myhost/path/',
'https://myhost/path/',
None,
)
for setting in ('MEDIA_URL', 'STATIC_URL'):