Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

Allow 'content-type' header in requests #196

Open
luisscholl opened this issue Sep 20, 2020 · 0 comments
Open

Allow 'content-type' header in requests #196

luisscholl opened this issue Sep 20, 2020 · 0 comments

Comments

@luisscholl
Copy link

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant