Skip to main content
Image alt

category: Cloudflare Workers

HOW TO: Create a downtime failover for your site with a Cloudflare Worker

Route traffic to a failover maintaining the live domain for your visitors if your site can’t be reached or a 50X error is detected.

HOW TO: Block non-Cloudflare requests to your site with a Worker

What’s stopping an attacker from learning your server IP, bypassing Cloudflare and hitting your site directly? Try this…

HOW TO: Support .webp on Cloudflare’s edge with a Worker

A method to serve .webp to supported browsers only using Cloudflare workers (and optionally Webp Express).

HOW TO: Use Cloudflare Workers to enable Basic Auth on a subdirectory

Here’s a neat way to protect any subdirectory or URL with Basic Auth using Cloudflare Workers – no .htaccess or htpasswd required!

HOW TO: Use Cloudflare to handle Country-based redirects

Do you have a multilingual or multi-regional website that automatically redirects users based on their country? This is for you.

HOW TO: Use Cloudflare to reverse proxy a subdirectory

You need to serve a complete site through a “subdirectory” (ie. /news or /blog) without being able to move it. Cloudflare to the rescue!