Wrangler dev - headers.append() with the same name accepts only the last header

I’m writing a reverse proxy using wrangler dev to debug locally.
I’m trying to set multiple cookies on the response:

res = new Response(res.body, res);
res.headers.append('Set-Cookie',`cookie1=val1; SameSite=Strict;`);
res.headers.append('Set-Cookie',`cookie2=val2; SameSite=Strict;`); 

When running wrangler dev locally, only the second cookie is being set ovewriting the first cookies.
While publishing to Cloudflare using wrangler publish and sending the request, both cookies are being set successfully.

Do I miss anything in my implementation?

Hi @ork,

Can you report this as a bug on GitHub? GitHub - cloudflare/wrangler-legacy: 🤠 Home to Wrangler v1 (deprecated)

1 Like

I believe this got already fixed in [dev] allow multiple response header values by EverlastingBugstopper · Pull Request #1413 · cloudflare/wrangler-legacy · GitHub ?

Thanks, upgraded wrangler and it seems it is working right now!