diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 18b9cc8790a..ae94a5b920e 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -4343,8 +4343,9 @@ if ($action == 'editcss') { } if ($action == 'editsecurity') { - $selectarraySP = websiteGetContentPolicyDirectives(); - $selectarraySPlevel2 = websiteGetContentPolicySources(); + $selectarrayCSPDirectives = websiteGetContentPolicyDirectives(); + $selectarrayCSPSources = websiteGetContentPolicySources(); + $forceCSPArr = websiteGetContentPolicyToArray($forceCSP); print '
'; print '
'; @@ -4376,17 +4377,19 @@ if ($action == 'editsecurity') { print ''; print '
'; - // Security Policy + // Content Security Policy print '
'; print ''; print ''; print ''; + print ''; + print ''; - print ''; + print ''; print '
'.$langs->trans("SecurityPolicy").'
'.$langs->trans("Value").':
'.$form->selectarray("select_identifier_WEBSITE_SECURITY_FORCECSP", $selectarraySP, "select_identifier_WEBSITE_SECURITY_FORCECSP", 1, 0, 0, '', 0, 0, 0, '', 'minwidth300').''.$form->selectarray("select_identifier_WEBSITE_SECURITY_FORCECSP", $selectarrayCSPDirectives, "select_identifier_WEBSITE_SECURITY_FORCECSP", 1, 0, 0, '', 0, 0, 0, '', 'minwidth300').''; print ''; - foreach ($selectarraySPlevel2 as $key => $values) { + foreach ($selectarrayCSPSources as $key => $values) { print ''; @@ -4398,9 +4401,7 @@ if ($action == 'editsecurity') { print '
'; print '
'; - //TODO: add comment to explain + better look - - $forceCSPArr = websiteGetContentPolicyToArray($forceCSP); + // Content Security Policy list of selected rules print '
'; print ''; print '
'; - //TODO: add console.log in js + print '