Skip to content

Commit c5c9ad2

Browse files
committed
fix headers update in aws integration
1 parent 28de01c commit c5c9ad2

File tree

1 file changed

+8
-5
lines changed
  • localstack-core/localstack/services/apigateway/next_gen/execute_api/integrations

1 file changed

+8
-5
lines changed

localstack-core/localstack/services/apigateway/next_gen/execute_api/integrations/aws.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,14 @@ def invoke(self, context: RestApiInvocationContext) -> EndpointResponse:
188188
if credentials := integration.get("credentials"):
189189
credentials = render_uri_with_stage_variables(credentials, context.stage_variables)
190190

191-
headers = integration_req["headers"] | get_internal_mocked_headers(
192-
service_name=service_name,
193-
region_name=integration_region,
194-
source_arn=get_source_arn(context),
195-
role_arn=credentials,
191+
headers = integration_req["headers"]
192+
headers.update(
193+
get_internal_mocked_headers(
194+
service_name=service_name,
195+
region_name=integration_region,
196+
source_arn=get_source_arn(context),
197+
role_arn=credentials,
198+
)
196199
)
197200
query_params = integration_req["query_string_parameters"].copy()
198201
data = integration_req["body"]

0 commit comments

Comments
 (0)