(WIP) Add Accept-Encoding header#175
Conversation
|
See #176 this PR isn't a 100% fix. |
|
@pro-src the 100% fix would be faking UA along with Accept headers? |
|
Yup, for now at least |
|
@pro-src what about using some library like https://www.npmjs.com/package/useragent-generator with a set of hardcoded Accept headers from https://developer.mozilla.org/en-US/docs/Web/HTTP/Content_negotiation/List_of_default_Accept_values per browser? |
|
@codemanki I like the API in |
|
@codemanki 🤔 Maybe we shouldn't even try to cover this and demand that user's supply their own headers if they encounter trouble. Maybe point them to a web service that will show their headers so they can copy and paste them. This one really catches my eye as they can specify the resource to request: On our end, besides updating the README, we could adjust the accept headers for types specified on that mdn page. e.g. |
|
@VeNoMouS what do you think? |
|
Well what i found... re the UA... you only need to match the UA on requesting and delivering the secret... past that point as long as your cookie is set CF just doesn't care.. you can use what ever UA you want... and yes, you need to disable redirects on the secret other wise you end up in this continuous loop with your code if it doesn't verify the challenge least that was my experience.. |
|
@VeNoMouS Good point, thx for the chime in. |
|
@codemanki After looking at the code of |
|
Related to what @VeNoMouS said: #177 (comment) |
|
I haven't forgot about this. I'm collecting some data for it. Afterwards, I'll see about what needs to be done to fix this PR or close it in preference of a new one. 💡 |
|
I have the data and that wikipedia article is trash. Thus, if you want to properly spoof a browser then you must have the exact headers of that browser version and send them in the exact same order that it would send them. I have the data that we need to do UA randomization properly and will be sending a new PR. Edit: If you want a copy of the data, just let me know. |
|
Closing in preference of #196 |
Builds on #174 by adding the 'Accept-Encoding' header for domains that require it. Supports gzipped encoded responses by default and prevents CAPTCHA.