23
ishttps
is_https
SYNOPSIS
is_https()
DESCRIPTION
is_https
returns true
if the request is sent in HTTPS.
CODE
- function is_https() {
- return (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' || $_SERVER['HTTP_X_FORWARDED_PROTO'] == 443));
- }
Comments