aboutsummaryrefslogtreecommitdiff
path: root/ext/js/comm/anki.js
diff options
context:
space:
mode:
authorarchiif <60074051+archiif@users.noreply.github.com>2022-01-05 01:44:47 +0700
committerGitHub <noreply@github.com>2022-01-05 01:44:47 +0700
commitfaa5ed7184a1d9aaff200674b538632862b7f1ab (patch)
treedeee4cc1fea92bce09d447b7d191e0c08ccd0d5b /ext/js/comm/anki.js
parent0e52a1f509155673d26a2a1ad00987389a05fea6 (diff)
Set `Content-Type` header of AnkiConnect requests to `application/json`
Diffstat (limited to 'ext/js/comm/anki.js')
-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})