Diagnostic step 1
Inspect Worker code: ensure fetch(request, { headers }) explicitly sets Authorization from original request (use request.headers.get('authorization')) before calling fetch.
Generated Oct 18, 2026, 9:45:27 AM
Inspect Worker code: ensure fetch(request, { headers }) explicitly sets Authorization from original request (use request.headers.get('authorization')) before calling fetch.
Use Request constructor to preserve body and method: new Request(originUrl, { method: req.method, headers: forwardedHeaders, body: req.body }).
Enable debug logs in Workers (console.log) to assert header values before and after modifications but avoid logging secrets; log boolean presence only.
Temporarily set a page rule to bypass Worker and Cloudflare for a test path to confirm origin behavior without Cloudflare.
Check Cloudflare WAF and Transform Rules for rules that inspect X-Forwarded-For or Authorization and temporarily disable them for test path.