I want to read the following response headers.
Response-Header:
...
set-cookie: somecookie=7ABFBB3446C856779B59A837DE3946F7DB; Path=/; Secure;
set-cookie: wantedcookie=12414ASDFAFADFW2342342; Path=/; Secure;
...
The variable $sent_http_set_cookie contains the first header
$sent_http_set_cookie = somecookie=7ABFBB3446C856779B59A837DE3946F7DB; Path=/; Secure;
--
How to read the second header in order to get the value of the wantedcookie?
The nginx configuration looks like this:
location /api {
add_header X-Debug "${sent_http_set_cookie}";
}