Skip to content

Commit bd155b3

Browse files
author
thom
committed
Set DirectoryIndex and unset CSP for /stats
1 parent 94be0a2 commit bd155b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/plugins-available/apache2_plugin.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1841,7 +1841,7 @@ function update($event_name, $data) {
18411841

18421842
if($data['new']['stats_type'] != '') {
18431843
if(!is_dir($data['new']['document_root'].'/' . $web_folder . '/stats')) $app->system->mkdir($data['new']['document_root'].'/' . $web_folder . '/stats');
1844-
$ht_file = "AuthType Basic\nAuthName \"Members Only\"\nAuthUserFile ".$data['new']['document_root']."/web/stats/.htpasswd_stats\nrequire valid-user";
1844+
$ht_file = "AuthType Basic\nAuthName \"Members Only\"\nAuthUserFile ".$data['new']['document_root']."/web/stats/.htpasswd_stats\nrequire valid-user\nDirectoryIndex index.php\nHeader unset Content-Security-Policy";
18451845
$app->system->file_put_contents($data['new']['document_root'].'/' . $web_folder . '/stats/.htaccess', $ht_file);
18461846
$app->system->chmod($data['new']['document_root'].'/' . $web_folder . '/stats/.htaccess', 0755);
18471847
unset($ht_file);

0 commit comments

Comments
 (0)