Ultimately, you'll need to pass an array to set multiple values for the same header
res.header('Set-Cookie', ['foo', 'bar']);
Looking at response library for express we can see the following examples:
/**
* Set header `field` to `val`, or pass
* an object of header fields.
*
* Examples:
*
* res.set('Foo', ['bar', 'baz']);
* res.set('Accept', 'application/json');
* res.set({ Accept: 'text/plain', 'X-API-Key': 'tobi' });
*
* Aliased as `res.header()`.
*
* @param {String|Object} field
* @param {String|Array} val
* @return {ServerResponse} for chaining
* @public
*/
A deeper dive into the code shows us that this is really just a proxy for node's response.setHeader(), which follows the same format
Sets a single header value for implicit headers. If this header
already exists in the to-be-sent headers, its value will be replaced.
Use an array of strings here if you need to send multiple headers with
the same name.
response.setHeader('Set-Cookie', ['type=ninja', 'language=javascript']);