can't log into website cached by varnish

Tobias Eichelbrönner tobias.eichelbroenner at lamp-solutions.de
Fri Nov 28 22:09:03 CET 2014


Hi Tim,

> if (req.http.host ~ "^www\.ref\.mydomain\.com$") {
>                 unset req.http.Cookie;
>         }

I guess as soon as you pass login, you use different URL as login.php
As you unset you cookie, you backend cannot know that you are logged in.

A common way is to stop caching if your are logged in.
if(req.http.cookie ~ "my_loggin_cookie"){
	return pass;
}

Sincerely,

Tobias


-- 
LAMP solutions GmbH
Gostenhofer Hauptstrasse 35
90443 Nuernberg

Amtsgericht Nuernberg: HRB 22366
Geschaeftsfuehrer: Heiko Schubert

Es gelten unsere allgemeinen Geschaeftsbedingungen.
http://www.lamp-solutions.de/agbs/

Telefon      : 0911 / 376 516 0
Fax          : 0911 / 376 516 11
E-Mail       : support at lamp-solutions.de
Web          : www.lamp-solutions.de
Facebook     : http://www.facebook.com/LAMPsolutions
Twitter      : http://twitter.com/#!/lampsolutions



More information about the varnish-misc mailing list