function _cloudflare_settings in CloudFlare 6
Same name and namespace in other branches
- 7 cloudflare.module \_cloudflare_settings()
Load the cloudflare settings into a static array.
3 calls to _cloudflare_settings()
- _cloudflare_spam_api in ./
cloudflare.module - _cloudflare_threat_api in ./
cloudflare.module - Perform an action using Cloudflare's Threat API.
- _is_cloudflare_configured in ./
cloudflare.module - Check if Cloudflare has been configured.
File
- ./
cloudflare.module, line 438
Code
function _cloudflare_settings() {
static $cloudflare_settings;
if (!isset($cloudflare_settings)) {
$cloudflare_settings = array(
'cf_api_email' => variable_get('cloudflare_api_email', FALSE),
'cf_api_key' => variable_get('cloudflare_api_key', FALSE),
'cf_api_ssl_host' => "ssl://www.cloudflare.com",
'cf_api_https_host' => "https://www.cloudflare.com",
'cf_api_port' => 443,
'cf_ip_ranges' => array(
"204.93.240.0/24",
"204.93.177.0/24",
"204.93.173.0/24",
"199.27.128.0/21",
"173.245.48.0/20",
),
'my_ip' => $_SERVER["HTTP_CF_CONNECTING_IP"] ? $_SERVER["HTTP_CF_CONNECTING_IP"] : $_SERVER["REMOTE_ADDR"],
);
}
return $cloudflare_settings;
}