Created
July 11, 2023 05:54
-
-
Save kyouheicf/1d8fba01812afb7c79bd1f35295b9d41 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export EMAIL='YOUR_EMAIL' | |
export APIKEY='YOUR_APIKEY' | |
export ZONE_ID='YOUR_ZONE_ID' | |
# Purge by prefix | |
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 '{ | |
"prefixes": [ | |
"example.com/png/image.png" | |
] | |
}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment