503 HTTP Response


Having Cloudflare “I’m under attack” mode, cannot create GET/POST requests using cURL, getting 503 HTTP error. Any solutions to avoid 503 HTTP error?


Thats exactly what the Im Under Attack mode does.

You can try to whitelist the IPs you are trying to curl from to bypass this mode.


However browser GET/POST methods are fine. I assume cloudflare asks for appropriate request headers?


Do they work straight away or only after a successfully completed challenge?


Browser GET/POST methods work after a successful challenge completion.


Thats explains it :wink:


Browsers go through challenge, would it be possible to simulate the same operation using cURL?


Possible yes, but you basically need to emulate the entire request workflow.


You will need JavaScript and cookies to pass the challenge page.


So using cURL and get a 200 HTTP response is to make a request with cookies? I have JavaScript and cookies enabled.


Problem solved. Request headers were incomplete using cURL. Specifically Connection header, it appeared non existent.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.