From 4d1eb2c8db98e905c446ee2967aece54c8c3771c Mon Sep 17 00:00:00 2001 From: eric schkufza Date: Tue, 2 Nov 2021 15:00:15 -0700 Subject: [PATCH] Whitelist host.docker.internal along with localhost and localstack (#4522) --- moto/s3/responses.py | 1 + 1 file changed, 1 insertion(+) diff --git a/moto/s3/responses.py b/moto/s3/responses.py index ac407a3c8..d47273655 100644 --- a/moto/s3/responses.py +++ b/moto/s3/responses.py @@ -196,6 +196,7 @@ class ResponseObject(_TemplateEnvironmentMixin, ActionAuthenticatorMixin): not host or host.startswith("localhost") or host.startswith("localstack") + or host.startswith("host.docker.internal") or re.match(r"^[^.]+$", host) or re.match(r"^.*\.svc\.cluster\.local:?\d*$", host) ):