FEAT: Check if headers weren't sent already

This commit is contained in:
DS-13 2021-09-16 02:50:46 +03:00
parent 4f498dfc70
commit 7dd7b42c25
1 changed files with 4 additions and 0 deletions

View File

@ -55,6 +55,10 @@ class SecureHeaders
*/
private function removeUnwantedHeaders()
{
if (headers_sent()) {
return;
}
foreach ($this->unwantedHeaderList as $header) {
header_remove($header);
}