some URL shorteners (e.g. amzn.eu) return 404 for HEAD requests but 301 for GET. try HEAD first, fall back to GET on 404/405. also replace the old test guard hack with proper fetchMock usage.
Details: C3 = create-cloudflare@2.51.6 project name = url-cleaner package manager = npm@10.9.2 wrangler = wrangler@4.36.0 git = 2.51.0