Configure a CDN for static assets
Set correct Cache-Control headers, invalidate on deploy, add security headers, and enable Brotli/gzip compression for every asset type.
Preview
Copy prompt
Configure a CDN for a [Framework] web application using [CloudFront / Fastly / Cloudflare]. Define the correct Cache-Control headers for each asset type: long-lived immutable headers for hashed JS and CSS bundles, short-lived headers for HTML, and no-store for API responses. Configure cache invalidation to run automatically on each deployment. Add the following security headers at the CDN edge: Content-Security-Policy, Strict-Transport-Security, X-Frame-Options, and X-Content-Type-Options. Enable Brotli compression for all compressible content types.
More
DevOps
Prompts
