Automatically purge Cloudflare cache after Netlify build

Tutorials / Web Notes

2020.05.15

Automatically purge Cloudflare cache after Netlify build

Although Netlify provides CDN service, Cloudflare has more edge locations around the world. What's more, Netlify hosted sites are hardly reached in China, while Cloudflare still lives. With this in mind, I decided to switch to Cloudflare for load balancing. However, pushing post/file changes to Netlify did not clear Cloudflare's cache, that's a mess. So, I'm going to use Cloudflare's API together with Netlify's outgoing webhook to make them in the same pace.

Ads by Google
Ads by Google