diff options
author | archiif <60074051+archiif@users.noreply.github.com> | 2022-01-05 01:44:47 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-05 01:44:47 +0700 |
commit | faa5ed7184a1d9aaff200674b538632862b7f1ab (patch) | |
tree | deee4cc1fea92bce09d447b7d191e0c08ccd0d5b /ext | |
parent | 0e52a1f509155673d26a2a1ad00987389a05fea6 (diff) |
Set `Content-Type` header of AnkiConnect requests to `application/json`
Diffstat (limited to 'ext')
-rw-r--r-- | ext/js/comm/anki.js | 3 |
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}) |