8
ishttps
is_https
SYNOPSIS
is_https()
DESCRIPTION
is_https
retourne true
si la requête est envoyée en 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));
- }
Commentaires