feat: extract curl ua to config value#2568
feat: extract curl ua to config value#2568dvikan merged 3 commits intoRSS-Bridge:masterfrom dvikan:config-ua
Conversation
Pull request artifacts
|
|
Hi, In order to use different UAs (there might be a reason for that. Maybe sites provide content differently, read: easier to scrape, for older UAs), the server hoster would need to change the bridge back to a defined UA right? Because its a single UA for all, not by bridge. The change in this form will break all those bridges for people with custom configuration files (which is not uncommon), since the default.configuration change is not picked up by custom configs. So the bridge breaks because it's looking for a UA thats not in the default config |
|
The default config A few bridges used hardcoded uas:
I checked |
* exclude config.default.ini.php from phpcs
This change allows for modification of the curl ua in config.ini.php.
It's mostly a refactor but leaving out the version and github url from the ua. Ideally the ua should contain some information on how to reach the person responsible for the network traffic. But that only's a problem with misbehaving clients who spam with http requests. Could encourage bridge instances to modify it to include some contact information.
That ua is one of the most popular uas. It's Chrome 74 on Windows 10:
https://developers.whatismybrowser.com/useragents/parse/1302411chrome-windows-blink