function seckit_update_7103 in Security Kit 7
Changes Content-Security-Policy "xhr-src" directive to "connect-src".
http://drupal.org/node/1241226#comment-5125336
File
- ./
seckit.install, line 96 - Install/update/uninstall actions for SecKit.
Code
function seckit_update_7103() {
// update CSP directives
// connect-src is used instead of xhr-src
$options = variable_get('seckit_xss');
// add connect-src
$options['csp']['connect-src'] = $options['csp']['xhr-src'];
// remove xhr-src
unset($options['csp']['xhr-src']);
// delete and set new version of variable
variable_del('seckit_xss');
variable_set('seckit_xss', $options);
}