diff options
author | 2021-08-05 15:03:07 +0530 | |
---|---|---|
committer | 2021-08-05 12:56:30 +0000 | |
commit | c1aa23aca9ac88125b34e24f155c577ef5fad39c (patch) | |
tree | 7217fe47b4b9335ec766459431d989e487cd964b /src/api/apiBase.js | |
parent | revert: partially reverts the previous change to fix issue that the packaged ... (diff) | |
download | ferdium-app-c1aa23aca9ac88125b34e24f155c577ef5fad39c.tar.gz ferdium-app-c1aa23aca9ac88125b34e24f155c577ef5fad39c.tar.zst ferdium-app-c1aa23aca9ac88125b34e24f155c577ef5fad39c.zip |
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
Diffstat (limited to 'src/api/apiBase.js')
-rw-r--r-- | src/api/apiBase.js | 3 |
1 files changed, 2 insertions, 1 deletions
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 { | |||
7 | import { | 7 | import { |
8 | DEV_API_FRANZ_WEBSITE, | 8 | DEV_API_FRANZ_WEBSITE, |
9 | LIVE_FRANZ_API, | 9 | LIVE_FRANZ_API, |
10 | LOCAL_HOSTNAME, | ||
10 | LOCAL_SERVER, | 11 | LOCAL_SERVER, |
11 | SERVER_NOT_LOADED, | 12 | SERVER_NOT_LOADED, |
12 | } from '../config'; | 13 | } from '../config'; |
@@ -23,7 +24,7 @@ const apiBase = (withVersion = true) => { | |||
23 | } | 24 | } |
24 | if (window.ferdi.stores.settings.all.app.server === LOCAL_SERVER) { | 25 | if (window.ferdi.stores.settings.all.app.server === LOCAL_SERVER) { |
25 | // Use URL for local server | 26 | // Use URL for local server |
26 | url = `http://127.0.0.1:${window.ferdi.stores.requests.localServerPort}`; | 27 | url = `http://${LOCAL_HOSTNAME}:${window.ferdi.stores.requests.localServerPort}`; |
27 | } else { | 28 | } else { |
28 | // Load URL from store | 29 | // Load URL from store |
29 | url = window.ferdi.stores.settings.all.app.server; | 30 | url = window.ferdi.stores.settings.all.app.server; |