On 10/05/2012, at 21.25, Lasse Karstensen wrote:

> Torben Pedersen:
>> Hi,
>> I'm trying to use Varnish + a cookie to control access from mobile devices. 
>> I've seen other people doing similar, but I can't get it to work.
> [..]
>> Set-Cookie:nomobile=1; expires: Session; path=/; domain=.
>> This seems to be correct. So now I call
>> https://<server>
>> And I expect not to get redirected since the Set-Cookie is present. But the 
>> nomobile=1 is not present in request / Cookie. I don't quite get why ?
>> Any ideas ?
> 
> The "domain=." part stands out a bit. Are you sure this is accepted by the
> browser? Is the Cookie included on the next request?
> 
> As a reference you can check out the documentation for device detection
> in Varnish:
> https://www.varnish-cache.org/docs/trunk/tutorial/devicedetection.html
> https://github.com/varnish/varnish-devicedetect/
> 
> -- 
> Lasse Karstensen
> 
> _______________________________________________
> varnish-misc mailing list
> [email protected]
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Hi,

You're most likely correct Lasse. Now I've changed the solution a bit - because 
it wouldn't work since I was trying to delete the cookie. Now I'm changing the 
value of the cookie instead - for controlling access (thanks to Daniel S)

(I'm using nginx in front of Varnish in this solution for the https)

Thanks for all the replies.

kind regards

 Torben
_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to