Skip to content

Commit

Permalink
[#1421] Added SecKit module.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSkrypnyk committed Oct 16, 2024
1 parent 2c20606 commit 26f5bb3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"drupal/redis": "^1.8",
"drupal/search_api": "^1.35",
"drupal/search_api_solr": "^4.3",
"drupal/seckit": "^2.0",
"drupal/shield": "^1.8",
"drupal/stage_file_proxy": "^2.1",
"drush/drush": "^13",
Expand Down
2 changes: 2 additions & 0 deletions tests/phpunit/Drupal/EnvironmentSettingsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ public function testEnvironmentLocal(): void {
$config['system.performance']['cache']['page']['max_age'] = 900;
$config['system.performance']['css']['preprocess'] = 1;
$config['system.performance']['js']['preprocess'] = 1;
$config['seckit.settings']['seckit_xss']['csp']['checkbox'] = FALSE;
$this->assertConfig($config);

$settings['config_exclude_modules'] = [];
Expand Down Expand Up @@ -392,6 +393,7 @@ public function testEnvironmentCi(): void {
$config['system.performance']['cache']['page']['max_age'] = 900;
$config['system.performance']['css']['preprocess'] = 1;
$config['system.performance']['js']['preprocess'] = 1;
$config['seckit.settings']['seckit_xss']['csp']['checkbox'] = FALSE;
$this->assertConfig($config);

$settings['config_exclude_modules'] = [];
Expand Down
13 changes: 13 additions & 0 deletions web/sites/default/includes/modules/settings.seckit.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

/**
* @file
* Seckit settings.
*/

declare(strict_types=1);

if ($settings['environment'] == ENVIRONMENT_CI || $settings['environment'] == ENVIRONMENT_LOCAL) {
// Disable SCP locally and in CI as we do not serve the site over HTTPS.
$config['seckit.settings']['seckit_xss']['csp']['checkbox'] = FALSE;
}

1 comment on commit 26f5bb3

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.