• v1.0.0 e2ad754f51

    v1.0.0
    All checks were successful
    Test / test (push) Successful in 12s
    Stable

    michael released this 2026-10-08 12:35:46 +00:00 | 12 commits to main since this release

    A tiny, dependency-free redirect handler built on the standard Request / Response APIs. 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), 307 or 308
    • 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.error at startup instead of crashing at request time

    Install

    npm install git+https://code.thms.uk/michael/link-shortener.git#v1.0.0
    

    See the README for usage and all options.

    Downloads