Returns a postNavigationHooks-ready hook that runs PlaywrightContextUtils.handleCloudflareChallenge
and propagates the post-challenge Response back into the crawling context via its return value.
Cloudflare serves its challenge pages with a 403 status, which is part of the default blockedStatusCodes.
Keep it there - the hook runs before the blocked-status check and replaces the response on a solved
challenge, so solved requests pass it, while unsolved or undetected challenges keep the 403 and get
retried with a fresh session.
Returns a
postNavigationHooks-ready hook that runs PlaywrightContextUtils.handleCloudflareChallenge and propagates the post-challenge Response back into the crawling context via its return value.Cloudflare serves its challenge pages with a 403 status, which is part of the default
blockedStatusCodes. Keep it there - the hook runs before the blocked-status check and replaces the response on a solved challenge, so solved requests pass it, while unsolved or undetected challenges keep the 403 and get retried with a fresh session.Example usage