Cloudflare zero trust and workers
# workers-help
f
I have a cloudflare worker i would like to use to fetch from a cloudflare page that is behind cloudflare access/zero trust ACCESS->WORKER->ACCESS->PAGE I need the worker to be able to authenticate with cloudlflare access. I have tried using client id and secret, but because the workers are short lived they must constantly reauthenticate which is very slow and breaks some requests. Is there any other way for me to avoid this authentication redirect behaviour? PS: I need this because I'm using a worker to route traffic from a subroute of our main domain to a cloudflare page. Essentially we're serving many cloudflare pages under the same domain under subroutes
Okay, well We ended up reaching out to cloudflare about this and the issue was actually caused by returning the response to the client with the SET-Cookies header contianing a cloudflare acess cookie. We removed that cookie from the responses within the worker and all our problems were solved