Home

Awesome

CloudFlare Pages UrlShorten

Deploy this repo to your CloudFlare Pages, Create a Worker KV, Bind this Worker KV in your Pages project in Settings > Functions > KV namespaces bindings with Variable name called UrlShorten, Done

Deploy

Deploy settings

SettingValue
Build commandnpm run build
Build output directory/dist
Root directory/

Environment variables (recommended)

You could use any node version later than 16.

Variable nameValue
NODE_VERSION16.17.1

Functions (necessary)

I assume you have created a KV namespace for this Pages project.

Variable nameKV namespace
UrlShortenthe one you created

Other settings are not necessary.

Add a path

Add it to KV like:

KeyValue
pathreal url
/bloghttps://blog.orangii.cn
/morehttps://example.org

Gravatar Mirror

Check this out:

Gravatar https://cz.cyou/avatar/02e96d02a7364a53f44168f4beb7067c

Github Static File Mirror

Test with this README.md

Just add origin link to cz.cyou (or your deployed instance). https://cz.cyou/gh/${origin_link}

Credits

Github Mirror function from hunshcn/gh-proxy