blob: 4aa4499943475e151c15a8b98cf1cd7c724e9239 [file] [log] [blame]
<?php
require_once "report-file-path.php";
while (!file_exists($reportFilePath)) {
usleep(10000);
// file_exists() caches results, we want to invalidate the cache.
clearstatcache();
}
echo "<html><body>\n";
echo "CSP report received:";
$reportFile = fopen($reportFilePath, 'r');
while ($line = fgets($reportFile)) {
echo "<br>";
echo trim($line);
}
fclose($reportFile);
unlink($reportFilePath);
echo "<script>";
echo "if (window.testRunner)";
echo " testRunner.notifyDone();";
echo "</script>";
echo "</body></html>";
?>