-
released this
2026-10-08 12:35:46 +00:00 | 12 commits to main since this releaseA tiny, dependency-free redirect handler built on the standard
Request/ResponseAPIs. Runs on Cloudflare Workers, Bun, and other Fetch-API runtimes.Features
- Map slugs to absolute URLs and get back a
fetch(request)handler - Optional root redirect for
/ - Configurable redirect status:
301,302(default),307or308 - Query strings passed through to the target by default, or stripped with
stripQueryParams - Optional trailing-slash matching (
acceptTrailingSlash) - URL-decoded, case-sensitive slug matching, including non-ASCII slugs
- Built-in 404 page, or supply your own HTML with
notFoundPage - Invalid targets are skipped with a
console.errorat startup instead of crashing at request time
Install
npm install git+https://code.thms.uk/michael/link-shortener.git#v1.0.0See the README for usage and all options.
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
- Map slugs to absolute URLs and get back a