Skip to content

Commit

Permalink
Use Metadata-Flavor header for querying GCE
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeHex authored and gmmeyer committed Mar 28, 2017
1 parent 7c65e19 commit 57e4c66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/cloud_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def _get_metadata(agentConfig):
r = requests.get(
GCE.URL,
timeout=GCE.TIMEOUT,
headers={'X-Google-Metadata-Request': True}
headers={'Metadata-Flavor': 'Google'}
)
r.raise_for_status()
GCE.metadata = r.json()
Expand Down

0 comments on commit 57e4c66

Please sign in to comment.