Re: Cookie issue

2008-10-06 Thread Tollef Fog Heen
]] Morten Bekkelund 

| Tollef Fog Heen wrote:
|
|  if (req.url ~ ^/admin) {
| pass;
|  }
| 
|  in vcl_recv, so I presume that's not the problem you are running into?
|
| Well, I've tried that. That passes the single request to ^/admin, but
| does a lookup on every other request since the stuff under admin uses
| a lot of stuff in other paths. So it's a bit tricky :)

From the sound of it, it sounds like you are doing something very wrong
here; why do you want to do pass on other bits than the page itself?  I
presume any other content would be images, CSS and so on?  What is the
problem you are trying to solve?

If you really want to go your route, you could do something like setting
a cookie on /admin and then checking for that in vcl_recv and if so
doing pass.  It sounds completely wrong and quite error-prone to me,
though.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Cookie issue

2008-10-03 Thread Morten Bekkelund
Hey guys.

Here's the situation:
We got some 3rd party apps that runs via javascript on our webpages.
These apps sets cookies and therefore they are not cached by varnish by 
default.

I'm looking for a good approach to force a lookup when these cookies 
are set,
but still also force a pass when other cookies are set OR even do a 
pass for
the entire session when the req.url matches ^/admin ...for instance.

I've looked at the examples on the wiki, but couldn't find a suitable 
config for myself.

Regards, Mortis

___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Cookie issue

2008-10-03 Thread Tollef Fog Heen
]] Morten Bekkelund 

| I'm looking for a good approach to force a lookup when these cookies
| are set, but still also force a pass when other cookies are set OR
| even do a pass for the entire session when the req.url matches
| ^/admin ...for instance.

You probably want to do regex matches against req.http.cookie to ensure
you only cache for particular pages.  I'd also recommend reading through
http://varnish.projects.linpro.no/wiki/VCLExampleCacheCookies if you
haven't.

Doing pass on ^/admin should be something like

if (req.url ~ ^/admin) {
   pass;
}

in vcl_recv, so I presume that's not the problem you are running into?

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Cookie issue

2008-10-03 Thread Morten Bekkelund
Tollef Fog Heen wrote:
 ]] Morten Bekkelund 

 | I'm looking for a good approach to force a lookup when these cookies
 | are set, but still also force a pass when other cookies are set OR
 | even do a pass for the entire session when the req.url matches
 | ^/admin ...for instance.

 You probably want to do regex matches against req.http.cookie to ensure
 you only cache for particular pages.  I'd also recommend reading through
 http://varnish.projects.linpro.no/wiki/VCLExampleCacheCookies if you
 haven't.

 Doing pass on ^/admin should be something like

 if (req.url ~ ^/admin) {
pass;
 }

 in vcl_recv, so I presume that's not the problem you are running into?

   
Well, I've tried that. That passes the single request to ^/admin, but 
does a lookup on every other
request since the stuff under admin uses a lot of stuff in other paths.
So it's a bit tricky :)

___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc