Esempio n. 1
0
 /**
  * Comprobar y forzar (si es necesario) la coneción HTTPS
  */
 private static function checkHttps()
 {
     if (Util::forceHttpsIsEnabled() && !Util::httpsEnabled()) {
         $port = $_SERVER['SERVER_PORT'] != 443 ? ':' . $_SERVER['SERVER_PORT'] : '';
         $fullUrl = 'https://' . $_SERVER['SERVER_NAME'] . $port . $_SERVER['REQUEST_URI'];
         header('Location: ' . $fullUrl);
     }
 }