fix domain handling for local domain names in S3 API
This commit is contained in:
parent
bba197e29f
commit
b8a41c5605
1 changed files with 2 additions and 2 deletions
|
|
@ -53,8 +53,8 @@ class ResponseObject(_TemplateEnvironmentMixin):
|
||||||
if not host:
|
if not host:
|
||||||
host = urlparse(request.url).netloc
|
host = urlparse(request.url).netloc
|
||||||
|
|
||||||
if not host or host.startswith("localhost"):
|
if not host or host.startswith("localhost") or re.match(r"^[^.]+$", host):
|
||||||
# For localhost, default to path-based buckets
|
# For localhost or local domain names, default to path-based buckets
|
||||||
return False
|
return False
|
||||||
|
|
||||||
match = re.match(r'^([^\[\]:]+)(:\d+)?$', host)
|
match = re.match(r'^([^\[\]:]+)(:\d+)?$', host)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue