Skip to content
Snippets Groups Projects

added hook_help()

1 file
+ 22
0
Compare changes
  • Side-by-side
  • Inline
+ 22
0
@@ -4,3 +4,25 @@
* @file
* Contains csp.module.
*/
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_help().
*/
function csp_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.csp':
$content = '';
$content .= '<h3>' . t('About Content-Security-Policy module') . '</h3>';
$content .= '<p>' . t('The Content-Security-Policy module provides an interface for configuring the Content Security Policy (CSP) HTTP response header.') . '</p>';
$content .= '<h4>' . t('What is CSP?') . '</h4>';
$content .= '<p>' . t('Content Security Policy (CSP) is an added layer of security that helps to detect and mitigate certain types of attacks, including Cross Site Scripting (XSS) and data injection attacks.') . '</p>';
$content .= '<p>' . t('CSP works by defining a set of rules that specify which types of content are allowed to be loaded on a web page.') . '</p>';
$content .= '<h4>' . t('How to configure CSP with this module?') . '</h4>';
$content .= '<p>' . t('The Content-Security-Policy module provides an easy-to-use interface for configuring the CSP header. Simply navigate to the configuration page at /admin/config/system/csp, and use the provided form to configure your desired CSP policy.') . '</p>';
return ['#markup' => $content];
}
}
Loading