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
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.
Problem solved. Request headers were incomplete using cURL. Specifically Connection header, it appeared non existent.