Skip to content

Commit

Permalink
more csp tests
Browse files Browse the repository at this point in the history
  • Loading branch information
haarg committed Oct 30, 2024
1 parent 430b5d3 commit 2630a16
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions t/csp.t
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,10 @@ my $nonce1 = $csp1->nonce_for('script-src');
is $csp1->header_value, "script-src 'nonce-$nonce1'",
'nonce added to header properly';

my $digest = $csp1->sha_for('script-src' => 'some content');

is $csp1->header_value, "script-src 'nonce-$nonce1' 'sha256-$digest'",
'digest added to header properly';

done_testing;

0 comments on commit 2630a16

Please sign in to comment.