Skip to content

Instantly share code, notes, and snippets.

@kyouheicf
Last active July 13, 2023 17:26
Show Gist options
  • Select an option

  • Save kyouheicf/9b59f2eaca06bdbe8bbbc1bd6b74d260 to your computer and use it in GitHub Desktop.

Select an option

Save kyouheicf/9b59f2eaca06bdbe8bbbc1bd6b74d260 to your computer and use it in GitHub Desktop.
export EMAIL='YOUR_EMAIL'
export APIKEY='YOUR_APIKEY'
export ZONE_ID='YOUR_ZONE_ID'
# Purge Everything
curl --request POST \
--url https://api.cloudflare.com/client/v4/zones/$ZONE_ID/purge_cache \
--header 'Content-Type: application/json' \
--header "X-Auth-Email: $EMAIL" \
--header "X-Auth-Key: $APIKEY" \
--data '{
"purge_everything": true
}' && sleep 30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment