Do not send empty CSP

This commit is contained in:
Jakub Vrana 2018-01-13 14:21:54 +01:00
parent d39a6e59c7
commit b7fcebfba8

View file

@ -97,7 +97,9 @@ function page_headers() {
foreach ($adminer->csp() as $key => $val) {
$csp[] = "$key $val";
}
header("Content-Security-Policy: " . implode("; ", $csp));
if ($csp) {
header("Content-Security-Policy: " . implode("; ", $csp));
}
$adminer->headers();
}