Earlier the EXTRA_HEADERS passed to the customTabsIntent.intent.putExtra(Browser.EXTRA_HEADERS, headers), was working fine. After Chrome updated to 83, it stopped passing th
I'd like to elaborate a bit on the accepted answer. The Chrome 83 indeed removed the possibility to add custom headers, yet Chrome 86 reverted this functionality under certain strict conditions. See https://developers.google.com/web/android/custom-tabs/headers. Just follow an example from https://github.com/GoogleChrome/android-browser-helper/tree/master/demos/custom-tabs-headers.
TD;DR - you must own both app and website for making it work as the changes in app and The Digital Asset Links protocol file (website address (...)/.well-known/assetlinks.json) are needed.
Be sure to follow the tutorial and example precisely. In my case I stumbled with the one detail - CustomTabsIntent
Builder needs a CustomTabsSession
object set up.
Code changes in Chromium project indroducing a change can be found here: https://chromium-review.googlesource.com/c/chromium/src/+/2311582
Adding custom headers was removed due to being a vulnerability. CORS safe-listed request headers are still supported. You can read more about this change here: http://crbug.com/873178