문제

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

도움이 되었습니까?

해결책

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

Reference:

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top