Update metadata server URL to be a FQDN.

Without a fully qualified domain name, containers (like Docker) can't
connect to the metadata server. Update the address for the metadata
server to be a FQDN so containers can use the library. See #44.
This commit is contained in:
Paddy Foran 2014-10-07 17:38:45 -04:00
parent 8f816d62a2
commit ad051cf1e6
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ func (c *ComputeEngineConfig) FetchToken(existing *oauth2.Token) (token *oauth2.
if c.account != "" {
account = c.account
}
u := "http://metadata/computeMetadata/v1/instance/service-accounts/" + account + "/token"
u := "http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/" + account + "/token"
req, err := http.NewRequest("GET", u, nil)
if err != nil {
return