Asked 2 years ago
25 Apr 2022
Views 590
Mitul Dabhi

Mitul Dabhi posted

PHP : How to set Expect-CT header attribute ?

How to set Expect-CT header attribute in PHP?

i want to set Expect-CT header like this

Expect-CT: report-uri="<uri>", enforce,max-age=<age>
jassy

jassy
answered Apr 25 '22 00:00

use header() method of the php to send the Expect-CT header attribute


header("Expect-CT: enforce; max-age=30; report-uri='https://mydomain.com/enforce-uri'");


Expect-CT Properties :
max-age
The number of seconds after the reception of the Expect-CT header field during which the user agent should regard the host of the received message as a Known Expect-CT host.

report-uri
The URI where the user agent should report Expect-CT failures.
report-uri is optional property.

Note : Firefox Browser , Firefox Browser for Android and WebView Android don't support the Expect-CT

Post Answer