aboutsummaryrefslogtreecommitdiffstats
path: root/test/data/mock.php
diff options
context:
space:
mode:
Diffstat (limited to 'test/data/mock.php')
-rw-r--r--test/data/mock.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/data/mock.php b/test/data/mock.php
index 7e6aa1bec..52de8ae9d 100644
--- a/test/data/mock.php
+++ b/test/data/mock.php
@@ -201,9 +201,10 @@ ok( true, "mock executed");';
protected function cspNonce( $req ) {
// This is CSP only for browsers with "Content-Security-Policy" header support
// i.e. no old WebKit or old Firefox
+ $test = $req->query['test'] ? '-' . $req->query['test'] : '';
header( "Content-Security-Policy: script-src 'nonce-jquery+hardcoded+nonce'; report-uri ./mock.php?action=cspLog" );
header( 'Content-type: text/html' );
- echo file_get_contents( __DIR__ . '/csp-nonce.html' );
+ echo file_get_contents( __DIR__ . '/csp-nonce' . $test . '.html' );
}
protected function cspLog( $req ) {