From be5dc4f1692675c1cfaf18e75fe775fdb0590a8d Mon Sep 17 00:00:00 2001 From: Peter Volkov Date: Tue, 5 Mar 2024 14:43:28 +0200 Subject: [PATCH] fix: remove content-type header from idms get requests --- google/auth/aws.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google/auth/aws.py b/google/auth/aws.py index 6e0e4e864..12d20bba5 100644 --- a/google/auth/aws.py +++ b/google/auth/aws.py @@ -650,7 +650,7 @@ def _get_metadata_security_credentials( google.auth.exceptions.RefreshError: If an error occurs while retrieving the AWS security credentials. """ - headers = {"Content-Type": "application/json"} + headers = {} if imdsv2_session_token is not None: headers["X-aws-ec2-metadata-token"] = imdsv2_session_token