From c1aa23aca9ac88125b34e24f155c577ef5fad39c Mon Sep 17 00:00:00 2001 From: Vijay A Date: Thu, 5 Aug 2021 15:03:07 +0530 Subject: fix: change all occurrences of hard-coded ip address '127.0.0.1' to 'localhost' Also refactored to make this a constant defined in a single file where it is imported for all other uses. fixes #1253 --- src/api/apiBase.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/api/apiBase.js') diff --git a/src/api/apiBase.js b/src/api/apiBase.js index 3278dc454..db974c96f 100644 --- a/src/api/apiBase.js +++ b/src/api/apiBase.js @@ -7,6 +7,7 @@ import { import { DEV_API_FRANZ_WEBSITE, LIVE_FRANZ_API, + LOCAL_HOSTNAME, LOCAL_SERVER, SERVER_NOT_LOADED, } from '../config'; @@ -23,7 +24,7 @@ const apiBase = (withVersion = true) => { } if (window.ferdi.stores.settings.all.app.server === LOCAL_SERVER) { // Use URL for local server - url = `http://127.0.0.1:${window.ferdi.stores.requests.localServerPort}`; + url = `http://${LOCAL_HOSTNAME}:${window.ferdi.stores.requests.localServerPort}`; } else { // Load URL from store url = window.ferdi.stores.settings.all.app.server; -- cgit v1.2.3-70-g09d2