Hello!
I'm trying to add a cookie to the browser. So I'm using and auth service that creates a header (Set-Cookie) and sends it to the services inside the application, like this:
jwtAuthentication:
forwardAuth:
address: "some/url/that/works"
trustForwardHeader: true
authResponseHeaders:
- "Set-Cookie"
I checked and the Set-Cookie header is sent to the service correctly.
The thing is that I want to add the same header as it is to the response without having to go inside the service and add the request header to the response headers, but I haven't found a clear answer to that:
serviceAudience:
headers:
customRequestHeaders:
X-Audience: "some-x-audience"
customResponseHeaders:
Set-Cookie: 'I don't know what to put here'
I know that if I add the Set-Cookie to the customResponseHeaders it will set a cookie on the browser with whichever value I provide, but I want the value from the forwarded auth service headers.
I tried a couple of solutions that didn't work out such as:
customResponseHeaders:
Set-Cookie: Set-Cookie
customResponseHeaders:
Set-Cookie: true
customResponseHeaders:
Set-Cookie: Headers('set-cookie')