summaryrefslogtreecommitdiff
path: root/ext/js/comm
diff options
context:
space:
mode:
authorAlex Yatskov <FooSoft@users.noreply.github.com>2022-01-06 20:42:52 -0800
committerGitHub <noreply@github.com>2022-01-06 20:42:52 -0800
commitaae9717780827b92c51954630f505800ad373f4b (patch)
treedeee4cc1fea92bce09d447b7d191e0c08ccd0d5b /ext/js/comm
parent0e52a1f509155673d26a2a1ad00987389a05fea6 (diff)
parentfaa5ed7184a1d9aaff200674b538632862b7f1ab (diff)
Merge pull request #2047 from archiif/patch-1
Set `Content-Type` header of AnkiConnect requests to `application/json`
Diffstat (limited to 'ext/js/comm')
-rw-r--r--ext/js/comm/anki.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/js/comm/anki.js b/ext/js/comm/anki.js
index e8cf7afd..e615dc39 100644
--- a/ext/js/comm/anki.js
+++ b/ext/js/comm/anki.js
@@ -174,6 +174,9 @@ class AnkiConnect {
mode: 'cors',
cache: 'default',
credentials: 'omit',
+ headers: {
+ 'Content-Type': 'application/json'
+ },
redirect: 'follow',
referrerPolicy: 'no-referrer',
body: JSON.stringify({action, params, version: this._localVersion})