Nextcloud Cannot modify header information

https://github.com/the-djmaze/snappymail/issues/929#issuecomment-1582552784
This commit is contained in:
the-djmaze 2023-06-12 10:58:56 +02:00
parent fc6a58fd5d
commit 43d885b922

View file

@ -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');
}