Set-Cookie is getting folded on all tunnels, preventing multiple cookies to get set

I recognize this issue from Cloudflare Workers (Where it’s fixed).

… but this happens on Cloudflare Pages & Tunnel too and there it seems un-fixable.
Since the cookies are folded, only the first cookie is set correctly in all modern browsers.

Set-Cookie:
test=test; expires=Sat, 20 Jul 2024 10:32:14 GMT; SameSite=Strict; Domain=testdomain.xyz; Path=/, test2=test2; expires=Sat, 20 Jul 2024 10:32:14 GMT; SameSite=Strict; Domain=testdomain.xyz; Path=/

Without tunnel it is correct:

Set-Cookie:
test=test; expires=Sat, 20 Jul 2024 10:32:14 GMT; SameSite=Strict; Domain=testdomain.xyz; Path=/
Set-Cookie:
test2=test2; expires=Sat, 20 Jul 2024 10:32:14 GMT; SameSite=Strict; Domain=testdomain.xyz; Path=/

Please could you help us out by providing your steps to replicate this problem?

If you’ve got an open origin where we can see this issue replicated, and another that doesn’t run through tunnel that demonstrates the correct behaviour, that would also be very useful.

Thanks!

1 Like

@louis.cassidy I replied in a PM since i setup the test on a dev env that shouldn’t be public.

1 Like

Hey, it’s been another 30 days, any follow-up on this?

The bug is a lot worse now too, because the second folded cookie is NEVER set on the latest chrome/chromium.

Folded cookies does work!

However, folded cookies don’t get set if ANY of the multiple cookies - cookie settings (Like date) differ except for the value, if it differs from the first cookie - they get rejected by the browser.

So I’m closing this issue and marking this as the solution.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.