From 31340bedc59179259982e5490cd3f31247a3e2ac Mon Sep 17 00:00:00 2001 From: Ian Arawjo Date: Thu, 20 Jul 2023 10:30:20 -0400 Subject: [PATCH] Add 0.0.0.0 to localhost hostnames check --- chainforge/react-server/src/backend/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chainforge/react-server/src/backend/utils.ts b/chainforge/react-server/src/backend/utils.ts index 5bf02a4..9c0fedc 100644 --- a/chainforge/react-server/src/backend/utils.ts +++ b/chainforge/react-server/src/backend/utils.ts @@ -42,7 +42,7 @@ export function APP_IS_RUNNING_LOCALLY(): boolean { // Calculate whether we're running the app locally or not, and save the result try { const location = window.location; - _APP_IS_RUNNING_LOCALLY = location.hostname === "localhost" || location.hostname === "127.0.0.1" || location.hostname === ""; + _APP_IS_RUNNING_LOCALLY = location.hostname === "localhost" || location.hostname === "127.0.0.1" || location.hostname === "0.0.0.0" || location.hostname === ""; } catch (e) { // ReferenceError --window or location does not exist. // We must not be running client-side in a browser, in this case (e.g., we are running a Node.js server)