How do I set multiple http header fields with the same key in Node.js?
问题 I'm trying to set up server push with cloudflare, but they require multiple link header fields to push multiple files. However, I can't find any documented way to include multiple header fields with the same key in node.js. I tried providing an array, but that just concatenates them together as the value for a single header field. 回答1: express You pass an array of values to res.header('HeaderName', arrayOfValues) . Here's a working example and cURL output showing the duplicate response