diff options
author | Kristóf Marussy <kristof@marussy.com> | 2021-05-17 18:45:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-17 18:45:16 +0200 |
commit | d3f518490d499aaf0d7c3848d09f9309da56cfd0 (patch) | |
tree | 4d5c49e5d110023546216bd295273b3515b8ae9f /src | |
parent | Fixing stale reference to npm module that has been removed. (diff) | |
download | ferdium-app-d3f518490d499aaf0d7c3848d09f9309da56cfd0.tar.gz ferdium-app-d3f518490d499aaf0d7c3848d09f9309da56cfd0.tar.zst ferdium-app-d3f518490d499aaf0d7c3848d09f9309da56cfd0.zip |
Use X-Franz headers to talk to the server (#1429)
1fcfccd broke communication with the internal server by using X-Ferdi
headers instead of X-Franz headers on HTTP requests.
For compatibility reasons, we retain the X-Franz headers insteaf of
X-Ferdi headers in the internal server.
This commits reverts the change to the headers to restore internal
server functionality.
Diffstat (limited to 'src')
-rw-r--r-- | src/api/utils/auth.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/api/utils/auth.js b/src/api/utils/auth.js index 4dbfcd6d4..6dbdeaa7f 100644 --- a/src/api/utils/auth.js +++ b/src/api/utils/auth.js | |||
@@ -8,11 +8,11 @@ export const prepareAuthRequest = (options = { method: 'GET' }, auth = true) => | |||
8 | mode: 'cors', | 8 | mode: 'cors', |
9 | headers: Object.assign({ | 9 | headers: Object.assign({ |
10 | 'Content-Type': 'application/json', | 10 | 'Content-Type': 'application/json', |
11 | 'X-Ferdi-Source': 'desktop', | 11 | 'X-Franz-Source': 'desktop', |
12 | 'X-Ferdi-Version': app.getVersion(), | 12 | 'X-Franz-Version': app.getVersion(), |
13 | 'X-Ferdi-platform': process.platform, | 13 | 'X-Franz-platform': process.platform, |
14 | 'X-Ferdi-Timezone-Offset': new Date().getTimezoneOffset(), | 14 | 'X-Franz-Timezone-Offset': new Date().getTimezoneOffset(), |
15 | 'X-Ferdi-System-Locale': app.getLocale(), | 15 | 'X-Franz-System-Locale': app.getLocale(), |
16 | }, options.headers), | 16 | }, options.headers), |
17 | }); | 17 | }); |
18 | 18 | ||