public static function isHttps() { return !empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] !== 'off' || $_SERVER["SERVER_PORT"] == 443; }