Log in value from Set-Cookie header in nginx
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: http://nginx.org/r/map man pcresyntax 来源: https://stackoverflow.com/questions/18138503/log-in-value-from-set-cookie-header-in-nginx