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 7409346e2..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'];
+ const knownHosts = ['ic0.app', 'icp0.io', '127.0.0.1', 'localhost'];
const hostname = location?.hostname;
let knownHost;
if (hostname && typeof hostname === 'string') {