Testing Expect-CT reports

906 Views Asked by At

I'm writing an Express route for Expect-CT violations and I do not know how to create mock violations to trigger the report-uri directive.

Is there a way to trigger this in-browser or through cURL / Postman?

My thoughts was to recreate the JSON body of a report in Postman but surely there's a way to create more realistic test cases?

1

There are 1 best solutions below

1
user9124569 On

try this

curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X POST -d '{"json":{"data":"some data"}}' https://report.example.com/report-uri/

got from https://aaronhorler.com/articles/php-reporturi.html

all credits to aaron