okhttp/4.9.0 user agent is blocked in potential bot crawling lists
See original GitHub issueHome Assistant Android version: 2021.1.1-full
Android version: 10
Phone model: OP5T
Home Assistant version: 2021.1.4
Last working Home Assistant release (if known):
Description of problem: The user agent used by the android app (okhttp/4.9.0) seems to be pretty generic and it is being blocked in some blacklists (see https://github.com/JayBizzle/Crawler-Detect/issues/437)
I guess it would be better to modify the user-agent with something less generic to avoid being blocked.
Traceback (if applicable, to get the logs you may refer to: https://companion.home-assistant.io/docs/troubleshooting/faqs/#android-crash-logs):
n/a
Screenshot of problem:
Additional information:
bunkerized-nginx uses these lists, and it blocks access to home-assistant when trying to log in as:
2021/02/16 12:55:07 [warn] 24951#24951: *35 [lua] access_by_lua(main-lua.conf:166):80: [BLOCK] User-Agent okhttp/4.9.0 is blacklisted, client: 10.0.2.100, server: www.example.com, request: "POST /auth/token HTTP/2.0", host: "www.example.com"
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:12 (5 by maintainers)
Top GitHub Comments
The error is safe to ignore as notifications do not work in the debug build. Thank you for confirming the user agent change and that is working for your setup.
So I had tried to test those above changes however I do not have an environment setup to see the headers in the logs nor do they print to logcat. So I could attempt to make changes and submit a PR if you guys are willing to test the debug APK that gets generated. Would you guys be ok with that? Debug APKs are fine to install side by side the production app and can be safely removed once done testing.