Website Security & Threat Management
Automatically replacing polyfill.io links with Cloudflare’s mirror for a safer Internet

Automatically replacing polyfill.io links with Cloudflare’s mirror for a safer Internet

6/26/2024 · Matthew Prince, John Graham-Cumming, Michael Tremante

What this post added

Introduced an automatic JavaScript URL rewriting service that rewrites links to polyfill.io found in websites proxied by Cloudflare to a link to Cloudflare's mirror on cdnjs. This feature leverages ROFL (Response Overseer for FL) for performant HTML rewriting on the fly, ensuring safety and efficiency. The feature is enabled by default for free plan customers and is an optional, single-click activation for paid plan customers. The service parses script tag source attributes and rewrites them if they link to polyfill.io, provided no Content Security Policy (CSP) header is present.

Read the original post ↗