Skip to content

Blocked by cloudflare? #2249

Closed Answered by metcoder95
dorei44 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey! There are several moving parts that plays an important role here, and I sadly doubt that this has to do anything with undici.

Cloudflare returns 403 on several scenarios, depending on WAF configuration, IP rules and lastly the same origin server. Here you can find more info about that.

One part that seems particular here, is that you're trying to impersonate a browser, for http it works, but not the same for undici; and this might have to do with the way Undici establishes the connection compared to http.
If you remove the headers from the https version, you'll also receive a 403. That leads me to guess that is possible the request is failing Cloudflare's browsers integrity check, bu…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by dorei44
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants