We use Pressflow and Varnish. Can anyone tell me if FB Connect is compatible with Varnish?

http://varnish-cache.org/

http://pressflow.org/

Comments

gibbet’s picture

any experience on this? I'm using varnish too...

jrstmartin’s picture

Component: Miscellaneous » Code
Category: support » bug
Issue tags: +caching, +Pressflow

I'm running project Mercury on Lucid, which uses Memcache, Varnish, and Pressflow Drupal, and FBConnect 6.x-1.0-beta10 does not work. "External" caching is turned on in Pressflow Drupal, along with 2 Pressflow-specific caching modules, Varnish module, and Memcache module.

When you click to register with FBConnect, you are given the username/password prompt, but once you submit the form nothing happens, just a page refresh. It's really too bad. Mercury and caching is becoming popular but no worky.

vectoroc’s picture

Are you sure that it's pressflow related bug ?

jdschroeder’s picture

I can't confirm for sure that it's Pressflow related, but on a Pressflow site with which I am trying to use fbconnect, I can confirm the same behaviour as described by jrstmartin.

ranganathsm’s picture

Even I am facing similar issue. I am not getting the fbuid after logging in and the silent registration fails.

Anyone who has fixed it?

miaoulafrite’s picture

+1

sirkitree’s picture

Seems that we need to find some rules in Varnish for this to work. Press flow is not the issue but rather, just Varnish. I tested this by setting port 8080 to bypass Varnish on my site and fbconnect works just fine ONLY when bypassing Varnish.

Looking for a rule that will allow whatever is being blocked...

sirkitree’s picture

Title: Is FB connect compatible with Pressflow » Is FB connect compatible with Varnish
Issue tags: -Pressflow +varnish

Changing title to be more accurate and tags.

aether’s picture

subscribe

cdoyle’s picture

We're running fbconnect with PF and Varnish on http://www.maximumpc.com and http://www.maclife.com. Another developer did the setup on the module side but we didn't have to do anything special with the vcl on the Varnish end. There are some bugs we've run into on the module side (an especially annoying one related to block administration and theme switching) but it works from the user end of things. I can put up the vcl if you need but I suspect that may not be your issue.

klim_’s picture

subscribe.

sirkitree’s picture

@cdoyle: I'd love to read your VCL to compare with ours.

sirkitree’s picture

So, the facebook sdk (facebook.php) sets a cookie that you have to look out for, called fbs_#

Here's the relevant code in my vcl that handles this

set req.http.Cookie = regsuball(req.http.Cookie, ";(SESS[a-z0-9]+|fbs_[a-z0-9]+|NO_CACHE)=", "; \1=");

For the whole section, see here:
http://privatepaste.com/99bc6df9c6

After putting this in fbconnect now works with varnish.

cdoyle’s picture

@sirkitree I just saw your post and don't have time to throw up our current vcl but look at http://groups.drupal.org/node/47734 for a version that isn't too old. The main changes have been adjusting the session cookie removal in addition to some other cookies that were added to the site and stripping expires and cache control headers on html pages after the extended cache control.

Fidelix’s picture

Important. Subscribing..,

NenadP’s picture

I had same issue as described in #2 after Varnish implementation, but after i added in my vcl config
req.url ~ "^/user/login.*$" ||
in paths that are not cached, there was big improvement, now user can connect again via FBconnect.