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? https://github.com/cloudflare/wrangler

1 Like

I believe this got already fixed in https://github.com/cloudflare/wrangler/pull/1413 ?

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