aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/apiBase.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/apiBase.js')
-rw-r--r--src/api/apiBase.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/api/apiBase.js b/src/api/apiBase.js
index ab47c78ee..ce02922ac 100644
--- a/src/api/apiBase.js
+++ b/src/api/apiBase.js
@@ -8,10 +8,17 @@ import {
8 8
9const apiBase = () => { 9const apiBase = () => {
10 let url; 10 let url;
11 if (!window.ferdi ||  11 if (!window.ferdi
12 !window.ferdi.stores.settings ||  12 || !window.ferdi.stores.settings
13 !window.ferdi.stores.settings.all) { 13 || !window.ferdi.stores.settings.all) {
14 // Stores have not yet been loaded - send invalid URL to force a retry when stores are loaded 14 // Stores have not yet been loaded - send invalid URL to force a retry when stores are loaded
15 // "Why 1.1.1.1 as the default, invalid URL?"
16 // 1.1.1.1 is the server for Cloudflare's DNS service and will be the same across most networks.
17 // Using a random IP could result in unwanted connections, using localhost could unwantedly
18 // connect to local develoment servers.
19 // 1.1.1.1 also sends a status 400 response for invalid routes. Other servers may return status 401
20 // on some routes. This would result in Ferdi deleting its current authToken as it thinks it
21 // has gone invalid.
15 url = 'https://1.1.1.1'; 22 url = 'https://1.1.1.1';
16 } else if (window.ferdi.stores.settings.all.app.server) { 23 } else if (window.ferdi.stores.settings.all.app.server) {
17 // Load URL from store 24 // Load URL from store