How to send two set-cookie headers or more

Can I set two custom headers 'set-cookie' in response, or more?
I was tried:

http:
  middlewares:
    cookie1:
      headers:
        customResponseHeaders:
          set-cookie: 'foo=bar;path=/'
    cookie2:
      headers:
        customResponseHeaders:
          set-cookie: 'asd=qwe;path=/'
...

routes:
  my-router:
    middlewares:
      - cookie1
      - cookie2

...

But i see only one header set-cookie: foo=bar;path=/ in response. Only the one declared first in the ingress route

Hi @zorgzerg,
Thanks for your interest in Traefik.

The current behavior of the header middleware is to replace the header value.
It is not possible to append the values in the cookie in Traefik.

If you need more help, could you describe your use case?

I want to pass two parameters in a cookie (they will be different for dev and prod environments) when requesting my SPA from the server. So far, I see only one solution: pass JSON in one cookie parameter and parse it in SPA

Seems to be a good solution.
Let me know if you need more help on this.