- DNS
- CDN
- Proxy protection (DDoS, WAF)
- Worker scripts (can return web pages for given URLs eg. maintenance page)
- List/Add/Update/Delete DNS records
- List zones, iterate zones
- Firewall rules
- Purge cache
- get Cloudflare IP Ranges for Proxied Protection for your firewall rules
cloudflare/cloudflare_*.sh
Integrates to generate the TXT validation records for LetsEncrypt to generate automatic free SSL certificates for Kubernetes ingresses.
HariSekhon/Kubernetes-configs cert-manager
Integrates to upsert DNS records to Cloudflare for Kubernetes ingresses.
HariSekhon/Kubernetes-configs external-dns
List of workers:
curl -X GET "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/workers/scripts" \
-H "X-Auth-Email: $EMAIL" \
-H "X-Auth-Key: $TOKEN"
List of workers routes:
curl -X GET "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/workers/scripts" \
-H "X-Auth-Email: $EMAIL" \
-H "X-Auth-Key: $TOKEN"
Create route:
curl -X POST "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/workers/routes" \
-H "X-Auth-Email: $EMAIL" \
-H "X-Auth-Key: $TOKEN" \
-H "Content-Type: application/json" \
--data '{"pattern":"*.mydomain.com/*","script":"maintenance"}'
Delete route:
curl -X DELETE "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/workers/routes/$ROUTE_ID" \
-H "X-Auth-Email: $EMAIL" \
-H "X-Auth-Key: $TOKEN"