Skip to content

Commit

Permalink
first check GCE_METADATA_HOST
Browse files Browse the repository at this point in the history
  • Loading branch information
ijrsvt committed Dec 8, 2021
1 parent ce6bd3d commit 6edde83
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion oauth2client/contrib/_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,13 @@
from oauth2client import transport



_GCE_METADATA_HOST = os.getenv('GCE_METADATA_HOST', os.getenv(
'GCE_METADATA_ROOT', "metadata.google.internal"
))

METADATA_ROOT = 'http://{}/computeMetadata/v1/'.format(
os.getenv('GCE_METADATA_ROOT', 'metadata.google.internal'))
_GCE_METADATA_HOST)
METADATA_HEADERS = {'Metadata-Flavor': 'Google'}


Expand Down

0 comments on commit 6edde83

Please sign in to comment.