Open joaquintoral opened 1 year ago
Can you try adding "http://localhost:3000"
and/or "http://localhost:8765"
to the webCorsOriginList
array?
{ "apiKey": null, "apiLogPath": null, "ignoreOriginList": [], "webBindAddress": "127.0.0.1", "webBindPort": 8765, "webCorsOrigin": "http://localhost", "webCorsOriginList": [ "http://localhost", null, "http://localhost:8765", "http://localhost:3000"] }
Can you try adding
"http://localhost:3000"
and/or"http://localhost:8765"
to thewebCorsOriginList
array?
{ "apiKey": null, "apiLogPath": null, "ignoreOriginList": [], "webBindAddress": "127.0.0.1", "webBindPort": 8765, "webCorsOrigin": "http://localhost", "webCorsOriginList": [ "http://localhost", null, "http://localhost:8765", "http://localhost:3000"] }
I did try that. But it didn't work. I had to edit the add-on code and add the URLs there instead.
Ok, that's weird. For me this always does the trick.
I'm getting this error
Access to XMLHttpRequest at 'http://localhost:8765/' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header has a value 'http://localhost' that is not equal to the supplied origin.
This is what my anki-connect config.js looks like
{ "apiKey": null, "apiLogPath": null, "ignoreOriginList": [], "webBindAddress": "127.0.0.1", "webBindPort": 8765, "webCorsOrigin": "http://localhost", "webCorsOriginList": [ "http://localhost", null ] }
I've been experimenting on this for the whole day, but I can't seem to figure out why Anki still won't allow me to pull data from Anki Connect.