Closed (works as designed)
Project:
Cloudflare Roles
Version:
7.x-1.0
Component:
Documentation
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Feb 2012 at 06:46 UTC
Updated:
14 Feb 2012 at 15:05 UTC
can you add the code listed by cloudflare to make it run better with varnish?
sub vcl_recv {
#cloudflare
remove req.http.X-Forwarded-For;
if (req.http.cf-connecting-ip) {
set req.http.X-Forwarded-For = req.http.cf-connecting-ip;
} else {
set req.http.X-Forwarded-For = client.ip;
}
...
}
Comments
Comment #1
SolomonGifford commentedThis is in the instructions on the main page:
Instructions:
Make sure you add the following to your settings.php:
$_SERVER['REMOTE_ADDR'] = $_SERVER["HTTP_CF_CONNECTING_IP"] ? $_SERVER["HTTP_CF_CONNECTING_IP"] : $_SERVER["REMOTE_ADDR"];
Drupal already looks at X-Forwarded-For:
http://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/ip_ad...