A platform for community discussion. Free, open, simple.
DEV: Fix multiple set-cookie through Ember-CLI proxy (#19316)
David Taylorf06be7d295a3
diff --git a/app/assets/javascripts/bootstrap-json/index.js b/app/assets/javascripts/bootstrap-json/index.jsindex 44414a95842..a2087fdc162 100644--- a/app/assets/javascripts/bootstrap-json/index.js+++ b/app/assets/javascripts/bootstrap-json/index.js@@ -319,7 +319,13 @@ async function handleRequest(proxy, baseURL, req, res) {});response.headers.forEach((value, header) => {- res.set(header, value);+ if (header === "set-cookie") {+ // Special handling to get array of multiple Set-Cookie header values+ // per https://github.com/node-fetch/node-fetch/issues/251#issuecomment-428143940+ res.set("set-cookie", response.headers.raw()["set-cookie"]);+ } else {+ res.set(header, value);+ }});res.set("content-encoding", null);