You are here

function http_response_headers_exclude_path in HTTP Response Headers 7

Helper to verify given path in exclude list.

Path can be any drupal internal path.

Parameters

string|null $path: A string path. Current path used, if no path specified explicitly.

Return value

bool TRUE if path in exclude list, FALSE otherwise.

1 call to http_response_headers_exclude_path()
http_response_headers_init in ./http_response_headers.module
Implements hook_init().

File

./http_response_headers.module, line 432
Contains HTTP response headers.

Code

function http_response_headers_exclude_path($path = NULL) {
  if (!$path) {

    // Convert the Drupal path to lowercase.
    $path = drupal_strtolower(drupal_get_path_alias());
  }
  if ($pages = variable_get('http_response_headers_exclude_pages', NULL)) {
    $pages = drupal_strtolower($pages);

    // Compare the lowercase internal and lowercase path alias (if any).
    return drupal_match_path($path, $pages);
  }
  return FALSE;
}