question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Don't send default WebView header "X-Requested-With"

See original GitHub issue

Describe 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/'

BurpSuiteCommunity_Nywnj9tdDn

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:closed
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
vetleledaalcommented, Apr 2, 2022

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.

0reactions
arkoncommented, Apr 2, 2022

No particular reason other than Chrome being more popular than Chromium. Is Chromium somehow more valid?

Read more comments on GitHub >

github_iconTop Results From Across the Web

The X-Requested-With Header - Stoutner
I just found that installing Android System WebView Beta gives you access to the WebView DevTools. There you cannot only disable the X-Requested...
Read more >
960720 - Sending X-Requested-With header to every website ...
In an Android app using WebView, the X-Requested-With header cannot be disabled, and is a huge fingerprinting problem.
Read more >
ajax - how to modify the value of the key 'X-requested-with' in ...
I have met a problem when I capture the http package when my webView visit a url. the package shows that the request...
Read more >
X-Requested-With in WebView - Chrome Platform Status
Removes the default X-Requested-With header from HTTP requests made by WebView. The X-Requested-With header is set by WebView, with the ...
Read more >
List of HTTP header fields - Wikipedia
HTTP header fields are a list of strings sent and received by both the client program and server on every HTTP request and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found