diff --git a/tests/functional/commands/local/lib/test_local_api_service.py b/tests/functional/commands/local/lib/test_local_api_service.py index bb1c5c4b9b..5b18a690ee 100644 --- a/tests/functional/commands/local/lib/test_local_api_service.py +++ b/tests/functional/commands/local/lib/test_local_api_service.py @@ -26,7 +26,7 @@ class TestFunctionalLocalLambda(TestCase): def setUp(self): - self.host = "0.0.0.0" + self.host = "127.0.0.1" self.port = random.randint(30000, 40000) # get a random port self.url = "http://{}:{}".format(self.host, self.port) diff --git a/tests/functional/local/apigw/test_local_apigw_service.py b/tests/functional/local/apigw/test_local_apigw_service.py index 7ae8fa8939..a36410b5ae 100644 --- a/tests/functional/local/apigw/test_local_apigw_service.py +++ b/tests/functional/local/apigw/test_local_apigw_service.py @@ -620,7 +620,7 @@ def make_service(list_of_routes, function_provider, cwd): service = LocalApigwService(list_of_routes, lambda_runner, port=port) scheme = "http" - url = '{}://0.0.0.0:{}'.format(scheme, port) + url = '{}://127.0.0.1:{}'.format(scheme, port) return service, port, url, scheme @@ -647,7 +647,7 @@ def make_service_response(port, method, scheme, resourcePath, resolvedResourcePa for header, value in headers.items(): response["headers"][header] = value - response["headers"]["Host"] = "0.0.0.0:{}".format(port) + response["headers"]["Host"] = "127.0.0.1:{}".format(port) response["headers"]["X-Forwarded-Port"] = str(port) response["headers"]["X-Forwarded-Proto"] = scheme