Migration guide
Use this guide when moving from the older Cloudflare Pages _redirects model to the current Worker model used by v8s.link.
What changed
wrangler.tomlis the deployment source of truth- Static files are served through the Worker assets binding named
ASSETS - The build copies
defaults/, overlayscustom/, and generatesbuild/v8s.json custom/v8s-links.txtis preferred when it exists; otherwise the build usesdefaults/v8s-links.txt/_statsand/_testsare protected by Cloudflare Access- Server-side analytics are emitted by the Worker
- Scanner probes and risky destinations are blocked by
v8s-blocklist.json
Convert legacy .lnk files
Legacy rows looked like this:
/github https://github.com/vanityURLs 302 "GitHub"
/docs/* https://docs.example.com/:splat 302 "Docs passthrough"
The new format is:
slug|target|state|title|description|tags|owner|expires_at|notes
Run the converter:
npm run convert:lnk -- .lnk custom/v8s-links.txt --owner v8s --force
Status codes map to states:
| Legacy status | New state |
|---|---|
301, 308 | permanent |
302, 303, 307 | ephemeral |
| omitted | ephemeral by default |
Use --default-state permanent if omitted statuses should become permanent links.
Verify after migration
- Run
npm run check - Visit
/ - Visit a valid short link and confirm the redirect
- Visit a missing slug and confirm the localized 404
- Visit
/expand/ - Visit
/_statsfrom a private browser and confirm Cloudflare Access login - Visit
/file.phpand confirm scanner probes are blocked or return a plain 404 - Confirm Umami or Fathom receives redirect events if analytics are configured