Don't send default WebView header "X-Requested-With"
See original GitHub issueDescribe your suggested feature
The X-Requested-With
header can and has been used to block Tachiyomi, see tachiyomiorg/tachiyomi-extensions#9738.
When setting client
to network.cloudflareClient
requests will be made with this header using the value com.android.browser
. This should be omitted instead for all such requests.
It’s not entirely obvious how this behaviour can be changed from an extension, and it appears to be beneficial for all extensions regardless.
Other details
Although not currently blocked, other requests use the header X-Requested-With: eu.kanade.tachiyomi
, such as when retrieving the favicon or some Cloudflare beacon stuff.
Relevant code(?) https://github.com/tachiyomiorg/tachiyomi/blob/master/app/src/main/java/eu/kanade/tachiyomi/network/interceptor/CloudflareInterceptor.kt#L104
# errors out with 1020
curl -H 'X-Requested-With: com.android.browser' 'https://www.toongod.com/'
# shows the normal cloudflare page
curl -H 'X-Requested-With: com.android.browsssser' 'https://www.toongod.com/'
Acknowledgements
- I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
- I have written a short but informative title.
- If this is an issue with an extension, I should be opening an issue in the extensions repository.
- I have updated the app to version 0.13.1.
- I will fill out all of the requested information in this form.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (8 by maintainers)
Chrome doesn’t actually use the header, so using it would make this stick out. There might be more popular regional apps using this header, but some apps using
org.chromium.chrome
include: DuckDuckGo, Opera GX, and Phoenix.No particular reason other than Chrome being more popular than Chromium. Is Chromium somehow more valid?