I'm using:
- Magento v1.7.0.2,
- Varnish cache v3.0.3 and
- One Page Checkout (OPC) module from IWD (v2.0.9)
I've added routes "onepagecheckout" and "onestepcheckout" to routes which should be excluded from the cache in Varnish.
I can see that OPC page is not loaded from Varnish and works as it should, however, when the quick login form is used on OPC page, it doesn't work properly together with Varnish. Even when all cache items (including Varnish full page cache) have been disabled in Magento Cache Management.
What I get is the following response from /onepagecheckout/index/login/ script:
{"success":true,"redirect":"http:\/\/myhost.com\/onepagecheckout\/index\/index\/"}
the page get's redirected to the shopping cart but I'm still not logged in.
When switching Varnish off, it works just fine.
Does anybody has some experience with this?
Many thanks in advance!
Finally solved the issue by adding the following lines to Varnish's VCL file:
although, these two routes were already added to "Routes to exclude from cache" in MADE configuration (seems that having them in the exception list) leads to simple
return(pass)
in the background.It is important to use
return(pipe);
instead ofreturn(pass);
to pass all the cookies to client.