aboutsummaryrefslogtreecommitdiffstats
path: root/src/api
diff options
context:
space:
mode:
authorLibravatar vantezzen <properly@protonmail.com>2019-08-25 19:56:44 +0200
committerLibravatar vantezzen <properly@protonmail.com>2019-08-25 19:56:44 +0200
commit81459b1632a62519998394cc0f7646b8b71c69ad (patch)
tree3599fcd9002ea88b98b128417b245cab34a99628 /src/api
parentRemove news due to logout issues (diff)
downloadferdium-app-81459b1632a62519998394cc0f7646b8b71c69ad.tar.gz
ferdium-app-81459b1632a62519998394cc0f7646b8b71c69ad.tar.zst
ferdium-app-81459b1632a62519998394cc0f7646b8b71c69ad.zip
Add explanation for usage of 1.1.1.1
Diffstat (limited to 'src/api')
-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