TravisFrank
TravisFrank
CDCloudflare Developers
Created by TravisFrank on 4/20/2024 in #workers-help
Durable Object returning 405s
I am running into some strange behavior - I deployed a new version of a worker with a bound DO 7.5 hours ago. I tested everything locally and in prod, all seemed well. About 1.5 hours ago I noticed that all of my DO requests are returning 405s and the service is very much broken. There were two deployments in the interim with identical code - I tried rolling back to the deployment that was working previously and I'm getting the exact same issue. Could a CF employee help me double-check the health of my DO? Can anyone shed some light on what might be happening here?
9 replies
CDCloudflare Developers
Created by TravisFrank on 4/2/2024 in #workers-help
Multiple Set-Cookie headers folded into one header
In the documentation (https://developers.cloudflare.com/workers/runtime-apis/headers/), it says that "the Headers.append method will allow you to set multiple Set-Cookie response headers instead of appending the value onto the existing header." However, the following code produces a single concatenated Set-Cookie header when sent to the client: const headers = new Headers(); headers.append('Set-Cookie', 'cookie1=1;'); headers.append('Set-Cookie', 'cookie2=2;'); return new Response(null, headers); getAll works properly in the Workers environment, but entries shows only a single Set-Cookie header. On the client, only a single header, like so: Set-Cookie: cookie1=1;, cookie2=2; This behavior breaks from spec and the docs and prevents me from setting multiple cookies on a single request. Browsers do not properly interpret a single Set-Cookie header. Is this a bug? Or am I missing something? How can I have multiple Set-Cookie headers on my response?
15 replies