From faa5ed7184a1d9aaff200674b538632862b7f1ab Mon Sep 17 00:00:00 2001 From: archiif <60074051+archiif@users.noreply.github.com> Date: Wed, 5 Jan 2022 01:44:47 +0700 Subject: [PATCH] Set `Content-Type` header of AnkiConnect requests to `application/json` --- ext/js/comm/anki.js | 3 +++ 1 file changed, 3 insertions(+) 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})