cloudflare · Cloudflare Workers Docs
Workers Hot-link protection
Implementation of a Cloudflare Worker to prevent hot-linking by blocking unauthorized websites from embedding your content, such as images.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Workers Hot-link protection
Implementation of a Cloudflare Worker to prevent hot-linking by blocking unauthorized websites from embedding your content, such as images.
When To Use
Use when you need to prevent other websites from consuming your bandwidth by hot-linking your hosted images or assets.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/workers-examples-hot-link-protection-workflow-guide.md | A markdown guide demonstrating how to implement hot-link protection using Cloudflare Workers to block unauthorized websites from linking to content. | Questions about a markdown guide demonstrating how to implement hot-link protection using Cloudflare Workers to block unauthorized we... |
examples/workers-examples-hot-link-protection-cloudflare-workers-hot-link-protect.text | A JavaScript worker script that implements hot-link protection by validating the Referer header for image requests. | Exact payloads, commands, or snippets shown in A JavaScript worker script that implements hot-link protection by validating the Referer header for image requests. |
examples/workers-examples-hot-link-protection-cloudflare-workers-hot-link-protect-2.text | A JavaScript worker script that implements hot-link protection by validating the Referer header for image requests. | Exact payloads, commands, or snippets shown in A JavaScript worker script that implements hot-link protection by validating the Referer header for image requests. |
examples/workers-examples-hot-link-protection-cloudflare-workers-hot-link-protect-3.text | A Python implementation of a Cloudflare Worker that prevents hot-linking by validating the Referer header for specific content types. | Exact payloads, commands, or snippets shown in A Python implementation of a Cloudflare Worker that prevents hot-linking by validating the Referer header for specifi... |
examples/workers-examples-hot-link-protection-cloudflare-workers-hono-hotlink-pro.text | A Hono middleware implementation for Cloudflare Workers that prevents hotlinking by validating the Referer header for image requests. | Exact payloads, commands, or snippets shown in A Hono middleware implementation for Cloudflare Workers that prevents hotlinking by validating the Referer header for... |
What This Skill Covers
- Block other websites from linking to your content. This is useful for protecting images.
- Main sections:
Tags.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://developers.cloudflare.com/workers/examples/hot-link-protection
