Prompt Buddy logoPrompt Buddy

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.

Import to Prompt Buddy

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

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-examples-hot-link-protection-workflow-guide.mdA 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.textA 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.textA 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.textA 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.textA 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

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. 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