#bypass workers with cookie
3 messages · Page 1 of 1 (latest)
Nope
Not directly, you have a few other options though:
- You can have your worker handle looking at the cookie first thing it does and just
return fetch(request). Less chance of it completely exploding early on - You can call
context.passThroughOnException(), which will pass through to the origin on an exception
https://developers.cloudflare.com/workers/runtime-apis/handlers/fetch/
Please note though that doesn't work in all cases. For example, it's a POST request and your worker already consumed the body, it's gone.