From 28c24c51f7a23683380b220395c965a41ab5487f Mon Sep 17 00:00:00 2001 From: Yang Luo Date: Mon, 24 Jul 2023 10:59:56 +0800 Subject: [PATCH] Improve initServerUrl() --- web/src/Setting.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/Setting.js b/web/src/Setting.js index 05dc800..8aef377 100644 --- a/web/src/Setting.js +++ b/web/src/Setting.js @@ -27,7 +27,7 @@ export let CasdoorSdk; export function initServerUrl() { const hostname = window.location.hostname; - if (hostname === "localhost") { + if (hostname === "localhost" || hostname === "127.0.0.1") { ServerUrl = `http://${hostname}:14000`; } }