fastcgi_cache_key with cookie
António P. P. Almeida
appa at perusio.net
Wed Dec 28 07:02:47 UTC 2011
On 28 Dez 2011 04h15 WET, nginx-forum at nginx.us wrote:
>> map $http_cookie $session_id {
>> default '';
>> ~SESS(?<session_guid>[[:alnum:]]+)
>> $session_guid;
>> }
>>
>> --- appa
>>
>
> That regex will only get you the cookie name (md5 of domain) without
> the cookie value. You will want the equal sign in there so you get
> both name and value:
>
> ~^.*SESS(?<key>[\w\=]+).*$ $key;
>
> or just the value:
>
> ~^.*SESS.+\=(?<key>[\w]+).*$ $key;
MD5 of the domain? How? AFAIK it's much more elaborate than that.
See:
http://svn.php.net/viewvc/php/php-src/branches/PHP_5_3_8/ext/session/session.c?revision=315335&view=markup
--- appa
More information about the nginx
mailing list