Pregunta

Is it possible to write in nginx access log value of key 'uuid' from Cookie for server response (header: Set-Cookie)?

$cookie_uuid - return uuid that sent client $sent_http_set_cookie - return whole header Set-Cookie: 'uuid=897587e7-a733-422f-9daa-b3105a5895aa; domain=domain.com; path=/; expires=Tue, 09-Aug-2033 01:17:54 GMT', but I need save only value for key 'uuid'

Thanks

¿Fue útil?

Solución

map $sent_http_set_cookie $resp_uuid {
    ~*uuid=(?<u>[0-9a-f-]+) $u;
}

Reference:

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top