Cloudflare's "Always Online" feature isn't working with a Drupal 6 site, even with the Cloudflare module. Cloudflare said:

You currently have rules in your HTTP response header...that are overriding our crawls for the Always Online feature. Here are the current caching rules you have in place:

Cache-Control: must-revalidate

You will need to change\remove these rules in order for us to start caching your site.

Is anyone else having this issue? Would it be difficult to add this feature to Drupal's Cloudflare module?

Comments

Brian294’s picture

Assigned: Unassigned » Brian294
Issue summary: View changes

Interesting. This might be possible using:
https://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/drup...
https://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_...

I even found an example implementation with hook_exit:
http://drupal.stackexchange.com/questions/90076/caching-drupal-7-using-b...

I'll give this some thought over the next couple months. Thank you for the suggestion!

phayes’s picture

I think the solution here is to have a configuration page where you can specify your "always on" pages.

The module would then set appropriate headers when it sees a request to one of these pages coming from a user-agent "Mozilla/5.0 (compatible; CloudFlare-AlwaysOnline/1.0; +http://www.cloudflare.com/always-online) AppleWebKit/534.34". This is the CloudFlare AlwaysOnline user-agent.

I'll work up a patch.

phayes’s picture

This issue is now fixed here: #2470237: Various fixes and improvements

Z2222’s picture

Thanks!

phayes’s picture

Version: 6.x-1.0-beta3 » 7.x-2.x-dev
Status: Active » Fixed

Marking as fixed. See 7.x-2.x version for fix.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.