You are here

function cdn_request_is_https in CDN 6.2

Same name and namespace in other branches
  1. 7.2 cdn.module \cdn_request_is_https()

Check if the current request is over HTTPS.

4 calls to cdn_request_is_https()
cdn_check_protocol in ./cdn.module
Check if the current protocol is supported by the CDN.
cdn_file_url_alter in ./cdn.module
Implementation of hook_file_url_alter().
cdn_serve_from_https in ./cdn.module
Check if CDN module should serve files from a HTTPS location.
_cdn_css_aggregate in ./cdn.basic.css.inc
Mostly based on drupal_get_css().

File

./cdn.module, line 676

Code

function cdn_request_is_https() {
  return isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' || isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' || isset($_SERVER['HTTP_X_FORWARDED_PROTOCOL']) && $_SERVER['HTTP_X_FORWARDED_PROTOCOL'] == 'https';
}