1.20.x bootstrap.inc backdrop_is_https()

Checks whether an HTTPS request is being served.

Return value

bool: TRUE if the request is HTTPS, FALSE otherwise.

File

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

Code

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