Skip to content

Explicitly set content type on xhr request #649

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fsiliadin
Copy link

As a user I had to introduce a proxy between the plugin and Anki actual program to work around issues with Snap packaging (Having Obsidian installed as a snap package).

That proxy used to set default headers on the request and caused it to be processed incorrectly. This line prevented that for the content type header.

It's important because when AnkiConnect does not recognize the content type it returns something like "AnkiConnect v.6" which cause the connection to fail.

As a user I had to introduce a proxy between the plugin and
Anki actual program to work around issues with Snap packaging
(Having Obsidian installed as a snap package).

That proxy used to set default headers on the request and
caused it to be processed incorrectly. This line prevented
that for the content type header.

It's important because when AnkiConnect does not recognize
the content type it returns something like "AnkiConnect v.6"
which cause the connection to fail.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant