Skip to content

fix: use default headers in getContents()#2927

Merged
dvikan merged 1 commit intoRSS-Bridge:masterfrom
dvikan:default-headers
Jul 31, 2022
Merged

fix: use default headers in getContents()#2927
dvikan merged 1 commit intoRSS-Bridge:masterfrom
dvikan:default-headers

Conversation

@dvikan
Copy link
Contributor

@dvikan dvikan commented Jul 17, 2022

The purpose of this pr is to decrease chance of anti-bot detection.
Modify getContents() so that it by default uses the firefox 102 headers as suggested by [0]. Tweak _http_request() so that its http headers are passed as an associative array.

Unfortunately the http headers as not passed as an associative array to getContents(). So they must be normalized first and then merged with the default values. Might be some issues regarding header name casing but not doing anything about now.

[0] https://github.com/lwthiker/curl-impersonate/blob/main/firefox/curl_ff102

@dvikan dvikan force-pushed the default-headers branch from 56c0757 to 886127e Compare July 31, 2022 02:05
@dvikan
Copy link
Contributor Author

dvikan commented Jul 31, 2022

I haven't found any bridges which bypasses anti-bot response because of this pr but I think it helps a little but. It also doesn't hurt. These headers will be ignored if using the curl-impersonate library (i think).

@dvikan dvikan merged commit afcc387 into RSS-Bridge:master Jul 31, 2022
@dvikan dvikan deleted the default-headers branch July 31, 2022 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant