mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix(occ): Do not attempt to send headers on CLI
This avoids errors like 'Cannot modify header information - headers already sent', when using --debug-log with occ. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
e61f0074f0
commit
f885d7292f
1 changed files with 4 additions and 3 deletions
|
|
@ -766,9 +766,10 @@ class OC {
|
|||
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');
|
||||
|
|
|
|||
Loading…
Reference in a new issue