function _seckit_expect_ct in Security Kit 7
Sends Excpect-CT HTTP response header.
Implementation is based on specification draft available at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Expect-CT.
1 call to _seckit_expect_ct()
- seckit_init in ./
seckit.module - Implements hook_init().
File
- ./
seckit.module, line 640 - Allows administrators to improve security of the website.
Code
function _seckit_expect_ct() {
$options = _seckit_get_options();
if ($options['seckit_ct']['expect_ct']) {
$header[] = sprintf("max-age=%d", $options['seckit_ct']['max_age']);
if ($options['seckit_ct']['enforce']) {
$header[] = 'enforce';
}
if ($options['seckit_ct']['report-uri']) {
$header[] = 'report-uri="' . $options['seckit_ct']['report-uri'] . '"';
}
$header = implode(', ', $header);
drupal_add_http_header('Expect-CT', $header);
}
}