Proposal: Add Support for Setting Multiple Cookies
Hey, I recently ran into a situation that highlighted a limitation.
One of my service’s endpoints needs to send multiple Set-Cookie headers in a single response. Right now, the framework doesn’t provide a way to emit more than one at a time. If I try to switch the field type to an array, I get an error like:
unsupported type in header: []string
I agree with the proposal mentioned in https://github.com/encoredev/encore/issues/1548
Here’s the example structure:
I believe the second option (using *http.Cookie and []*http.Cookie) is the correct approach, since it aligns with how request cookies are already handled and keeps the API consistent.
I believe []string is supported in the latest version of Encore.