aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/utils/auth.js
diff options
context:
space:
mode:
authorLibravatar Markus Hatvan <markus_hatvan@aon.at>2021-07-02 19:49:55 -0600
committerLibravatar GitHub <noreply@github.com>2021-07-03 07:19:55 +0530
commit33123c354b79f7951423dd75097b11e7eb075f99 (patch)
tree29f6e857f02d0e0fc67d89a657a54a865ed5538a /src/api/utils/auth.js
parentMinor refactoring to move all runtime configs from 'config.js' into 'environm... (diff)
downloadferdium-app-33123c354b79f7951423dd75097b11e7eb075f99.tar.gz
ferdium-app-33123c354b79f7951423dd75097b11e7eb075f99.tar.zst
ferdium-app-33123c354b79f7951423dd75097b11e7eb075f99.zip
Upgrade various dependencies to latest part 2 (#1557)
* Upgrade various dependencies to latest, remove unnecessary electron-hunspell - upgrade eslint and friends to latest - remove deprecated 'node-sass' in favor of 'sass' - disable new rules from 'eslint-config-airbnb' that are conflicting with current code style - add workspace config for 'vscode' that silences 'experimentalDecorator' warning and forces 'prettier' to single quote * Run yarn lint to autofix with new ruleset and worked down lint issues to zero
Diffstat (limited to 'src/api/utils/auth.js')
-rw-r--r--src/api/utils/auth.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/api/utils/auth.js b/src/api/utils/auth.js
index 5952cfe11..9f718f171 100644
--- a/src/api/utils/auth.js
+++ b/src/api/utils/auth.js
@@ -4,14 +4,15 @@ import localStorage from 'mobx-localstorage';
4export const prepareAuthRequest = (options = { method: 'GET' }, auth = true) => { 4export const prepareAuthRequest = (options = { method: 'GET' }, auth = true) => {
5 const request = Object.assign(options, { 5 const request = Object.assign(options, {
6 mode: 'cors', 6 mode: 'cors',
7 headers: Object.assign({ 7 headers: {
8 'Content-Type': 'application/json', 8 'Content-Type': 'application/json',
9 'X-Franz-Source': 'desktop', 9 'X-Franz-Source': 'desktop',
10 'X-Franz-Version': app.getVersion(), 10 'X-Franz-Version': app.getVersion(),
11 'X-Franz-platform': process.platform, 11 'X-Franz-platform': process.platform,
12 'X-Franz-Timezone-Offset': new Date().getTimezoneOffset(), 12 'X-Franz-Timezone-Offset': new Date().getTimezoneOffset(),
13 'X-Franz-System-Locale': app.getLocale(), 13 'X-Franz-System-Locale': app.getLocale(),
14 }, options.headers), 14 ...options.headers,
15 },
15 }); 16 });
16 17
17 if (auth) { 18 if (auth) {