From 6d858340ada4f8ea62ade1d7007b0415a827282a Mon Sep 17 00:00:00 2001 From: Christopher Wilcox Date: Wed, 31 Oct 2018 14:33:06 -0700 Subject: [PATCH 1/3] Use a FQDN for metadata.google.internal Minimize lookups by not expanding search path when resolving metadata.google.internal --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 862f3e32..c358b19e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -11,7 +11,7 @@ import * as rax from 'retry-axios'; const jsonBigint = require('json-bigint'); -export const HOST_ADDRESS = 'http://metadata.google.internal'; +export const HOST_ADDRESS = 'http://metadata.google.internal.'; export const BASE_PATH = '/computeMetadata/v1'; export const BASE_URL = HOST_ADDRESS + BASE_PATH; export const HEADER_NAME = 'Metadata-Flavor'; From 4bdcb5fd30048392f427ac39b9b8c1c279dbafdd Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 20 Nov 2018 20:19:24 -0800 Subject: [PATCH 2/3] Update index.ts --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index c358b19e..7e5cdee5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -11,7 +11,7 @@ import * as rax from 'retry-axios'; const jsonBigint = require('json-bigint'); -export const HOST_ADDRESS = 'http://metadata.google.internal.'; +export const HOST_ADDRESS = 'http://169.254.169.254'; export const BASE_PATH = '/computeMetadata/v1'; export const BASE_URL = HOST_ADDRESS + BASE_PATH; export const HEADER_NAME = 'Metadata-Flavor'; From 6f084072555193546beec6ddb2c6c346669d554e Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 26 Nov 2018 13:42:33 -0800 Subject: [PATCH 3/3] Update index.ts --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 27c9cb1e..ae839a91 100644 --- a/src/index.ts +++ b/src/index.ts @@ -9,7 +9,7 @@ import {request} from 'gaxios'; import {OutgoingHttpHeaders} from 'http'; const jsonBigint = require('json-bigint'); -export const HOST_ADDRESS = 'http://169.254.169.254'; +export const HOST_ADDRESS = 'http://metadata.google.internal.'; export const BASE_PATH = '/computeMetadata/v1'; export const BASE_URL = HOST_ADDRESS + BASE_PATH; export const HEADER_NAME = 'Metadata-Flavor';