From 48ddbaa9ef86fce9341efe710abc7024d8600240 Mon Sep 17 00:00:00 2001 From: Kyle Peacock Date: Mon, 27 Nov 2023 09:31:44 -0800 Subject: [PATCH 1/2] fix: restoring localhost to list of known hosts --- packages/agent/src/agent/http/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/agent/src/agent/http/index.ts b/packages/agent/src/agent/http/index.ts index 7409346e2..d0d6fac2b 100644 --- a/packages/agent/src/agent/http/index.ts +++ b/packages/agent/src/agent/http/index.ts @@ -224,7 +224,7 @@ export class HttpAgent implements Agent { ); } // Mainnet and local will have the api route available - const knownHosts = ['ic0.app', 'icp0.io', '127.0.0.1', '127.0.0.1']; + const knownHosts = ['ic0.app', 'icp0.io', '127.0.0.1', '127.0.0.1', 'localhost']; const hostname = location?.hostname; let knownHost; if (hostname && typeof hostname === 'string') { From 3f70db23e47509377b24539be7d3364cce764028 Mon Sep 17 00:00:00 2001 From: Kyle Peacock Date: Mon, 27 Nov 2023 09:32:19 -0800 Subject: [PATCH 2/2] changelog --- docs/generated/changelog.html | 4 ++++ packages/agent/src/agent/http/index.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/generated/changelog.html b/docs/generated/changelog.html index 577a4cfde..49cf04de9 100644 --- a/docs/generated/changelog.html +++ b/docs/generated/changelog.html @@ -12,6 +12,10 @@

Agent-JS Changelog

Version x.x.x

    +

    Version 0.20.2

    +
      +
    • fix: restoring localhost to list of known hosts
    • +

    Version 0.20.1

    • feat: retry query signature verification in case cache is stale
    • diff --git a/packages/agent/src/agent/http/index.ts b/packages/agent/src/agent/http/index.ts index d0d6fac2b..e3213f573 100644 --- a/packages/agent/src/agent/http/index.ts +++ b/packages/agent/src/agent/http/index.ts @@ -224,7 +224,7 @@ export class HttpAgent implements Agent { ); } // Mainnet and local will have the api route available - const knownHosts = ['ic0.app', 'icp0.io', '127.0.0.1', '127.0.0.1', 'localhost']; + const knownHosts = ['ic0.app', 'icp0.io', '127.0.0.1', 'localhost']; const hostname = location?.hostname; let knownHost; if (hostname && typeof hostname === 'string') {