Welcome! Log In Create A New Profile

Advanced

$10: how to check whether session exists?

Posted by qrhuang728 
$10: how to check whether session exists?
December 16, 2011 10:55AM
I use proxy_pass from apache, and I use proxy_cache to cache jpg. Now I want to cache all files except when session['customer_id'] exists, it means customers login.

How can I write this conf for nginx. thanks
Re: $10: how to check whether session exists?
January 01, 2012 09:25PM
I'm not a expert in this kind of things but you can try

if ($http_cookie ~* "customer_id")
{

}
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 98
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready