Merge pull request #2047 from archiif/patch-1

Set `Content-Type` header of AnkiConnect requests to `application/json`
This commit is contained in:
Alex Yatskov 2022-01-06 20:42:52 -08:00 committed by GitHub
commit aae9717780
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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})