Skip to content

Instantly share code, notes, and snippets.

@lmarquine
Forked from lucien144/cache-clear.sh
Created August 3, 2019 18:31
Show Gist options
  • Select an option

  • Save lmarquine/af5f7407c914f8cce28a53d6dbc93e18 to your computer and use it in GitHub Desktop.

Select an option

Save lmarquine/af5f7407c914f8cce28a53d6dbc93e18 to your computer and use it in GitHub Desktop.

Revisions

  1. @lucien144 lucien144 created this gist Jan 3, 2018.
    6 changes: 6 additions & 0 deletions cache-clear.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    #!/bin/bash
    curl -X DELETE "https://api.cloudflare.com/client/v4/zones/{$ZONE_ID}/purge_cache" \
    -H "X-Auth-Email: {$EMAIL}" \
    -H "X-Auth-Key: {$API_KEY}" \
    -H "Content-Type: application/json" \
    --data '{"purge_everything":true}'