Serverless Functions: Pass along cookies to client
Hi there, I'm using HubSpot Serverless functions and I have a simple use-case where I try to pass along all cookies I recieve from my API to my Client.
So basically I use the standard approach (like described in the docs) and it looks something like this:
Everything works well, except my cookies aren't passed along to the client. I've also tried to replace "Set-Cookie" with other params like "Cookie" or "Cookies" in case any of that work but no success.
Only one more question. I'm actually trying to send multiple cookies - not just one. According to http specs (https://developer.mozilla.org/de/docs/Web/HTTP/Headers/Set-Cookie) "multiple Set-Cookie headers should be sent in the same response". But if I try to do that, only one of the Set-Cookie Headers arrives:
yes, I have tried "Cookie" instead of "Location" and also "Set-Cookie" like in my example above but when I checked the response (in chrome dev tools) it seems like the cookie / Set-cookie Header was removed or rather never sent to the client at all. When I tried with "Location" the header was submitted and i was able to se it in the developer tools.