0

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?

Quill
  • 2,729
  • 1
  • 33
  • 44

1 Answers1

0

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

gtosto
  • 1,381
  • 1
  • 14
  • 18