diff --git a/lib/base.php b/lib/base.php index 2884aaea9d539..fcc6fe700d02f 100644 --- a/lib/base.php +++ b/lib/base.php @@ -766,9 +766,10 @@ public static function init(): void { self::checkConfig(); self::checkInstalled($systemConfig); - self::addSecurityHeaders(); - - self::performSameSiteCookieProtection($config); + if (!self::$CLI) { + self::addSecurityHeaders(); + self::performSameSiteCookieProtection($config); + } if (!defined('OC_CONSOLE')) { $eventLogger->start('check_server', 'Run a few configuration checks');