function cdn_request_is_https in CDN 7.2
Same name and namespace in other branches
- 6.2 cdn.module \cdn_request_is_https()
Check if the current request is over HTTPS.
5 calls to cdn_request_is_https()
- CDNGeneralTestCase::testHTTPSDetection in tests/
cdn.test - cdn_check_protocol in ./
cdn.module - Check if the current protocol is supported by the CDN.
- cdn_file_url_alter in ./
cdn.module - Implements hook_file_url_alter().
- cdn_serve_from_https in ./
cdn.module - Check if CDN module should serve files from a HTTPS location.
- _cdn_build_css_cache in ./
cdn.basic.css.inc - Near-identical to Changes:
File
- ./
cdn.module, line 847
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';
}