seckit.install in Security Kit 8
Same filename and directory in other branches
Install, update and uninstall functions for the seckit module.
File
seckit.installView source
<?php
/**
* @file
* Install, update and uninstall functions for the seckit module.
*/
/**
* Remove x_content_type from seckit module configuration.
*/
function seckit_update_8101() {
\Drupal::configFactory()
->getEditable('seckit.settings')
->clear('seckit_xss.x_content_type')
->save();
}
/**
* Replace "empty" with an empty string for the Referrer-Policy.
*/
function seckit_update_8102() {
$config = \Drupal::configFactory()
->getEditable('seckit.settings');
if ($config
->get('seckit_various.referrer_policy_policy') == 'empty') {
$config
->set('seckit_various.referrer_policy_policy', '""')
->save(TRUE);
}
}
Functions
Name | Description |
---|---|
seckit_update_8101 | Remove x_content_type from seckit module configuration. |
seckit_update_8102 | Replace "empty" with an empty string for the Referrer-Policy. |