cloudflare
2 commands
2 shown
Purge cache by URL
Selective purge by file; note: purge_everything thrashes cache, avoid in prod
curl -sX POST "https://api.cloudflare.com/client/v4/zones/<id>/purge_cache" -H "Authorization: Bearer $CF_TOKEN" -H 'Content-Type: application/json' --data '{"files":["https://<host>/app.js"]}'
Create proxied DNS record
Add A record behind CF proxy; proxied=true requires ttl=1 (auto)
curl -sX POST "https://api.cloudflare.com/client/v4/zones/<id>/dns_records" -H "Authorization: Bearer $CF_TOKEN" -H 'Content-Type: application/json' --data '{"type":"A","name":"<host>","content":"<ip>","proxied":true,"ttl":1}'
no commands match