Skip to content

Instantly share code, notes, and snippets.

@alexjamesbrown
Created June 30, 2019 22:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexjamesbrown/40989476642790c48cc3952615cfc7a7 to your computer and use it in GitHub Desktop.
Save alexjamesbrown/40989476642790c48cc3952615cfc7a7 to your computer and use it in GitHub Desktop.
Clear an item from the Cloudflare cache using curl
curl -X POST "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/purge_cache" \
-H "X-Auth-Email: user@example.com" \
-H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
-H "Content-Type: application/json" \
--data '{"files":["http://www.example.com/css/styles.css",{"url":"http://www.example.com/cat_picture.jpg","headers":{"Origin":"cloudflare.com","CF-IPCountry":"US","CF-Device-Type":"desktop"}}]}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment