1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-09 08:06:59 +02:00

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) { foreach ($adminer->csp() as $key => $val) {
$csp[] = "$key $val"; $csp[] = "$key $val";
} }
header("Content-Security-Policy: " . implode("; ", $csp)); if ($csp) {
header("Content-Security-Policy: " . implode("; ", $csp));
}
$adminer->headers(); $adminer->headers();
} }