Skip to content
2 changes: 1 addition & 1 deletion google/auth/aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,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

Expand Down
Loading