can't log into website cached by varnish

Andrew Langhorn andrew.langhorn at digital.cabinet-office.gov.uk
Sat Nov 29 01:52:10 CET 2014


I would assume that it's the value of the cookie that changes per logged-in
user, not the cookie's name. So, if you pass on the name of the cookie
rather than the value, you should be okay. Unless your solution for
multiple logged-in users requires multiple cookies, in which case you pass
on the existence of any.

Maybe I'm barking up the wrong tree there, though.

On Friday, 28 November 2014, Tim Dunphy <bluethundr at gmail.com> wrote:

> Hi Tobias,
>
> 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;
>> }
>
>
> Ok! Thanks for that tip. I can give that a try. But, wouldn't that require
> you to know the particular name of the cookie? What if you're dealing with
> multiple users? Is there a generic you can pass in place of
> 'my_cookie_login'?
>
> Thanks
> Tim
>
>
>
>
> On Fri, Nov 28, 2014 at 4:09 PM, Tobias Eichelbrönner <
> tobias.eichelbroenner at lamp-solutions.de
> <javascript:_e(%7B%7D,'cvml','tobias.eichelbroenner at lamp-solutions.de');>>
> wrote:
>
>> 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
>> <javascript:_e(%7B%7D,'cvml','support at lamp-solutions.de');>
>> Web          : www.lamp-solutions.de
>> Facebook     : http://www.facebook.com/LAMPsolutions
>> Twitter      : http://twitter.com/#!/lampsolutions
>>
>> _______________________________________________
>> varnish-misc mailing list
>> varnish-misc at varnish-cache.org
>> <javascript:_e(%7B%7D,'cvml','varnish-misc at varnish-cache.org');>
>> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>>
>
>
>
> --
> GPG me!!
>
> gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
>
>

--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20141129/414dd999/attachment.html>


More information about the varnish-misc mailing list