function seckit_menu in Security Kit 7
Same name and namespace in other branches
- 6 seckit.module \seckit_menu()
Implements hook_menu().
File
- ./
seckit.module, line 44 - Allows administrators to improve security of the website.
Code
function seckit_menu() {
// Settings page
$items['admin/config/system/seckit'] = array(
'title' => 'Security Kit',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'seckit_admin_form',
),
'description' => 'Configure various options to improve security of your website.',
'access arguments' => array(
'administer seckit',
),
'file' => 'includes/seckit.form.inc',
);
// Menu callback for CSP reporting.
// We nominally accept all CSP violation reports (no access callback)
// but the page callback avoids processing invalid or unwanted requests.
$items[SECKIT_CSP_REPORT_URL] = array(
'page callback' => '_seckit_csp_report',
'access callback' => TRUE,
'type' => MENU_CALLBACK,
);
// Original path for the above; deprecated in 7.x-1.10. It is important
// that this remains valid for now, as the CSP headers in cached pages
// will report the path as it was at the time they were cached.
//
// TODO: Remove this in some future release. There is no hurry to do this;
// it is better that we maintain this for a few releases (because not
// everyone will upgrade at every release), than risk that any CSP
// violation reports hit invalid URLs. Note that pages may be cached for
// long periods of time. It is probably reasonable to remove this after
// minimums of one year and two intervening releases.
$items['admin/config/system/seckit/csp-report'] = $items[SECKIT_CSP_REPORT_URL];
return $items;
}