コード例 #1
0
ファイル: RouteHandler.class.php プロジェクト: 0xLeon/WCF
	/**
	 * Returns true if this is a secure connection.
	 * 
	 * @return	true
	 */
	public static function secureConnection() {
		if (self::$secure === null) {
			self::$secure = false;
			
			if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' || $_SERVER['SERVER_PORT'] == 443) {
				self::$secure = true;
			}
		}
		
		return self::$secure;
	}
コード例 #2
0
 /**
  * Returns true if this is a secure connection.
  * 
  * @return	true
  */
 public static function secureConnection()
 {
     if (self::$secure === null) {
         self::$secure = false;
         if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' || $_SERVER['SERVER_PORT'] == 443 || !empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') {
             self::$secure = true;
         }
     }
     return self::$secure;
 }