anki-connect
anki-connect copied to clipboard
Allow 'content-type' header in requests
Hi,
I am developing a client using Angular as the frontend and AnkiConnect as the backend. Thereby I run into a CORS issue. Angular's HttpClient (which has some benefits over plain Javascript) automatically adds the 'Content-Type'
header and requests it in the preflight request with the header 'Access-Control-Request-Headers': 'content-type'
. AnkiConnect however does not allow the 'Content-Type'
header with 'Access-Control-Allow-Headers': 'content-type'
, which leads to the request being blocked due to the same origin policy. Angular does not support removing the header.
Could AnkiConnect allow the 'Content-Type'
header, please?