Set Content-Type header of AnkiConnect requests to application/json

This commit is contained in:
archiif 2022-01-05 01:44:47 +07:00 committed by GitHub
parent 0e52a1f509
commit faa5ed7184
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -174,6 +174,9 @@ class AnkiConnect {
mode: 'cors', mode: 'cors',
cache: 'default', cache: 'default',
credentials: 'omit', credentials: 'omit',
headers: {
'Content-Type': 'application/json'
},
redirect: 'follow', redirect: 'follow',
referrerPolicy: 'no-referrer', referrerPolicy: 'no-referrer',
body: JSON.stringify({action, params, version: this._localVersion}) body: JSON.stringify({action, params, version: this._localVersion})