You are here

function cdn_basic_farfuture_reverseproxy_test in CDN 7.2

Same name and namespace in other branches
  1. 6.2 cdn.basic.farfuture.inc \cdn_basic_farfuture_reverseproxy_test()
1 string reference to 'cdn_basic_farfuture_reverseproxy_test'
cdn_menu in ./cdn.module
Implements hook_menu().

File

./cdn.basic.farfuture.inc, line 164
Far Future expiration setting for basic mode.

Code

function cdn_basic_farfuture_reverseproxy_test($token) {
  $reference_token = variable_get('cdn_reverse_proxy_test');
  if ($reference_token === FALSE || $token != $reference_token) {
    header('HTTP/1.1 403 Forbidden');
    exit;
  }
  if (function_exists('header_remove')) {
    header_remove('Cache-Control');
  }
  else {
    header("Cache-Control:");
    header("Cache-Control:");
  }
  header("Cache-Control: max-age=290304000, no-transform, public");
  header("Expires: Tue, 20 Jan 2037 04:20:42 GMT");
  header("Last-Modified: Wed, 20 Jan 1988 04:20:42 GMT");
  print REQUEST_TIME . '-' . md5(rand());
  exit;
}