You are here

function drupal_is_https in Drupal 7

Checks whether an HTTPS request is being served.

Return value

bool TRUE if the request is HTTPS, FALSE otherwise.

1 call to drupal_is_https()
drupal_settings_initialize in includes/bootstrap.inc
Sets the base URL, cookie domain, and session name from configuration.

File

includes/bootstrap.inc, line 745
Functions that need to be loaded on every Drupal request.

Code

function drupal_is_https() {
  return isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on';
}