AnkiconnectAndroid icon indicating copy to clipboard operation
AnkiconnectAndroid copied to clipboard

Support Access-Control-Request-Private-Network response header

Open killergerbah opened this issue 1 year ago • 2 comments

I've received reports of asbplayer not working with AnkiConnect Android due to this missing header. For some reason HTTP requests made from Yomitan are unaffected. However, requests from webpages seem to require this response header for some users.

More info about this header: https://developer.chrome.com/blog/private-network-access-preflight?hl=en

killergerbah avatar Jan 12 '25 03:01 killergerbah

I believe ASB Player worked in the past right?

Is it an Ankiconnect Android version which no longer works or has ASB Player changed to now require this?

KamWithK avatar Jan 18 '25 06:01 KamWithK

Yes, in fact asbplayer still works with AnkiConnect Android on my phone. I have only received one report of this problem from a different user.

I'm not sure why, but some Chrome users have this problem and others don't. This is out of asbplayer's control, as far as I can tell. However adding this header should not be hard. I've done it for AnkiConnect before (https://github.com/FooSoft/anki-connect/pull/302).

killergerbah avatar Jan 18 '25 09:01 killergerbah

@killergerbah Is there a link to one of these reports of asbplayer not working because of this response header? I believe I made changes that would resolve it, but I am not sure how to test to make sure.

drakargx avatar Apr 06 '25 22:04 drakargx

@drakargx I've only received one report via Discord. This is the screenshot @shiki-tm sent me when trying to use AnkiConnect Android:

Image

It looks like it's happening when attempting any AnkiConnect HTTP request from https://killergerbah.github.io/asbplayer on Kiwi Brower. I'm not sure why only some users see this issue and others don't.

killergerbah avatar Apr 06 '25 22:04 killergerbah