Skip to content

Latest commit

 

History

History
67 lines (45 loc) · 1.61 KB

README.md

File metadata and controls

67 lines (45 loc) · 1.61 KB

Cloudflare Worker - Mirrors

This is a Cloudflare Worker that mirrors to another HTTP connection.

Deploy to Cloudflare Workers

Supported sites

Getting Started

Installation

Run the following command to install dependencies:

bun install

Other package managers can be used as well.

To start a development server, run:

bun run dev

Or to deploy to Cloudflare Workers, run:

bun run deploy

Configuration

Create file .dev.vars at the root of the project and add the following content:

SIGN_SECRET="<your secret>" # This is the secret key for signature

For more information about secrets, please refer to Secrets - Cloudflare Workers docs.

Modify environment variables in wrangler.deploy.toml to match your configuration.

# The version of your worker
VERSION = "2.0.0"
# This is the identifier of your worker service
SERVICE_NAME = "cf-worker-mirrors"
# Subdomains will be matched based on this value
# i.e. For docker, the subdomain will be `docker.example.com`
DOMAINS = ["example.com"]
# Convert `text/html` Content-Type to `text/plain` on fallback proxy
FORBID_HTML = true

License

CopyRight (c) Cnily03. All rights reserved.

Licensed under the MIT License.