]> git.joonet.de Git - adminer.git/commitdiff
Do not send empty CSP
authorJakub Vrana <jakub@vrana.cz>
Sat, 13 Jan 2018 13:21:54 +0000 (14:21 +0100)
committerJakub Vrana <jakub@vrana.cz>
Sat, 13 Jan 2018 13:21:54 +0000 (14:21 +0100)
adminer/include/design.inc.php

index 705e101a1a844479763bb6f1d0552817d5c8d10d..ad79bd6984c3d5b87fcab5380fcdfb6d52d1afc9 100644 (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();
 }