Set-Cookie not passing with resolveOverride

Hi all,

I use Workers for change the origin in a subdirectory. Set-Cookie is not passing to the end point.

4 User <> 3 CloudFlare <> 2 Fastly <> 1 Origin

In 1 and 2 i have the cookies correctly. Fastly is not blocking because cookies are in the service domain.

At the end user I am not able to see these cookies. CF may be blocking them? I have disabled security, cache and other things

My Worker:

addEventListener('fetch', event => {

event.respondWith(handleRequest(event.request))
})

async function handleRequest(request) {
return await fetch(request, { cf: { resolveOverride: ‘xxx’ } });

}

The page works well only the Set-Cookies do not arrive. Thanks!

You appear to override the hostname. Could it be that the cookie does arrive but then gets discarded because of a mismatch in hostname?

What’s the output when you run the following?

async function handleRequest(request)
{
	const response = await fetch(request, { cf: { resolveOverride: 'xxx' } });
	console.log(response.headers.has('Set-Cookie'));
	return response;
}

This topic was automatically closed after 14 days. New replies are no longer allowed.