sajad torkamani

Let’s suppose you’re using Cloudflare’s CAPTCHA and you want to simulate how your app behaves when a request to Cloudflare’s servers takes a while to load. Let’s suppose this is a request to a URL like:

https://challenges.cloudflare.com/cdn-cgi/challenge-platform/h/g/turnstile/if/ov2/av0/rcv0/0/w4d4s/0x4AAAAAAACXRmaJxldMz26y/light/fbE/normal/auto/

You can delay all HTTP requests to this type of URL using Proxyman.

First, enter the URL in the search bar (press Cmd + F if you can’t see the search bar):

Right-click on a matching URL entry and select Scripting:

Add a rule:

Define your script that matches against the URL pattern and that calls sleep() to delay the response:

Verify your script ran:

Tagged: Misc