Super simple Cloudflare Worker that performs redirections and serves a static site from Cloudflare Workers KV
Go to file
renovate[bot] 3798724ecf
chore(deps): update dependency typescript to v4.9.4
2022-12-07 23:59:14 +00:00
.github/workflows chore(deps): update actions/checkout action to v3 2022-03-01 18:57:39 +00:00
src all: sync with main site 2022-02-27 18:12:05 +05:30
.cargo-ok Initial commit 2020-05-30 00:06:10 +05:30
.gitignore Initial commit 2020-05-30 00:06:10 +05:30
.prettierrc Initial commit 2020-05-30 00:06:10 +05:30
LICENSE_APACHE Initial commit 2020-05-30 00:06:10 +05:30
LICENSE_MIT Initial commit 2020-05-30 00:06:10 +05:30
README.md fixup! README: update examples 2020-12-07 12:38:50 +05:30
package.json chore(deps): update dependency typescript to v4.9.4 2022-12-07 23:59:14 +00:00
renovate.json renovate: init 2022-02-27 18:09:32 +05:30
shell.nix feat: switch to Yarn 2022-05-01 20:28:34 +05:30
tsconfig.json Remove unused KV types 2020-06-02 20:05:09 +05:30
webpack.config.js Initial commit 2020-05-30 00:06:10 +05:30
wrangler.example.toml handler: source BASE_URL from config 2020-12-05 14:05:30 +05:30
yarn.lock chore(deps): update dependency typescript to v4.9.4 2022-12-07 23:59:14 +00:00

README.md

redirekt

A dead simple and very stupid Cloudflare Worker that does straightforward redirections to GitHub. As of recently, it also serves a static site out of Cloudflare's Workers KV product.

Example redirections

https://msfjarvis.dev/g => https://github.com/msfjarvis
https://msfjarvis.dev/g/redirekt => https://github.com/msfjarvis/redirekt
https://msfjarvis.dev/g/redirekt/8436184361 => https://github.com/msfjarvis/redirekt/commit/8436184361
https://msfjarvis.dev/aps => https://github.com/android-password-store/Android-Password-Store
https://msfjarvis.dev/aps/f56086cd78e8 => https://github.com/android-password-store/Android-Password-Store/commit/f56086cd78e8
https://msfjarvis.dev/aps/issue/1232 => https://github.com/Android-Password-Store/Android-Password-Store/issues/1232

How to use

The redirects are specific to my personal use so you might want to tweak/remove them before deploying to your own website.

Follow the Workers documentation to install wrangler, then copy wrangler.example.toml to wrangler.toml and update the routes and vars fields. You can also add your zone and account ID there, or use the environment variables as recommended in the Workers documentation.

Run wrangler publish and that should be it!