From 43d885b922487d55036c31f2664da7598f521128 Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Mon, 12 Jun 2023 10:58:56 +0200 Subject: [PATCH] Nextcloud Cannot modify header information https://github.com/the-djmaze/snappymail/issues/929#issuecomment-1582552784 --- snappymail/v/0.0.0/include.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snappymail/v/0.0.0/include.php b/snappymail/v/0.0.0/include.php index 8e4d71db0..48aff66ad 100644 --- a/snappymail/v/0.0.0/include.php +++ b/snappymail/v/0.0.0/include.php @@ -130,7 +130,7 @@ if (empty($_SERVER['HTTPS']) || 'off' === $_SERVER['HTTPS']) { if (isset($_SERVER['REQUEST_SCHEME']) && 'https' === $_SERVER['REQUEST_SCHEME']) { $_SERVER['HTTPS'] = 'on'; } -if (isset($_SERVER['HTTPS'])) { +if (isset($_SERVER['HTTPS']) && !headers_sent()) { header('Strict-Transport-Security: max-age=31536000'); }