Explorar el Código

Add CSP to favicons (#7471)

E.g. for the case of SVGs
Alexandre Alapetite hace 1 año
padre
commit
426e3054c2
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      p/f.php

+ 1 - 0
p/f.php

@@ -48,6 +48,7 @@ if ($ico_mtime == false || $ico_mtime < $txt_mtime || ($ico_mtime < time() - (mt
 	}
 }
 
+header("Content-Security-Policy: default-src 'none'; img-src 'self'; style-src 'self';");
 if (!httpConditional($ico_mtime, mt_rand(14, 21) * 86400, 2)) {
 	$ico_content_type = contentType($ico);
 	header('Content-Type: ' . $ico_content_type);