diff --git a/lib/bootstrap-definitions.php b/lib/bootstrap-definitions.php
index 06380a830d5e3559aefdfbcf757a029d7ad60679..e9841b8297ebbeadf604894c2e9e96373fde8f99 100644
--- a/lib/bootstrap-definitions.php
+++ b/lib/bootstrap-definitions.php
@@ -78,7 +78,8 @@ return [
             $session_handler = new Studip\Session\DbSessionHandler();
         }
         $GLOBALS['SESSION_OPTIONS']['path'] = $GLOBALS['CANONICAL_RELATIVE_PATH_STUDIP'];
-        $GLOBALS['SESSION_OPTIONS']['secure'] = Request::protocol() == 'https';
+        $GLOBALS['SESSION_OPTIONS']['secure'] = Request::protocol() === 'https';
+
         return new Studip\Session\Manager($session_handler, $GLOBALS['SESSION_OPTIONS']);
 
     }),