Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Installation/ServerFilesGenerator.php')
-rw-r--r--plugins/Installation/ServerFilesGenerator.php25
1 files changed, 12 insertions, 13 deletions
diff --git a/plugins/Installation/ServerFilesGenerator.php b/plugins/Installation/ServerFilesGenerator.php
index c3eab335f6..1207024bfd 100644
--- a/plugins/Installation/ServerFilesGenerator.php
+++ b/plugins/Installation/ServerFilesGenerator.php
@@ -33,13 +33,10 @@ class ServerFilesGenerator
$denyAll = self::getDenyAllHtaccessContent();
$allow = self::getAllowHtaccessContent();
- // more selective allow/deny filters
- $noDirectoryListing = "Options -Indexes\n";
-
$allowAny =
"# Allow any file in this directory\n" .
"<Files \"*\">\n" .
- $allow . "\n" .
+ "\t" . $allow . "\n" .
"</Files>\n";
$allowStaticAssets =
@@ -55,11 +52,11 @@ class ServerFilesGenerator
"</Files>\n";
$directoriesToProtect = array(
- '/js' => $allowAny . $noDirectoryListing,
- '/libs' => $denyAll . $allowStaticAssets . $noDirectoryListing,
- '/vendor' => $denyAll . $allowStaticAssets . $noDirectoryListing,
- '/plugins' => $denyAll . $allowStaticAssets . $noDirectoryListing,
- '/misc/user' => $denyAll . $allowStaticAssets . $noDirectoryListing,
+ '/js' => $allowAny,
+ '/libs' => $denyAll . $allowStaticAssets,
+ '/vendor' => $denyAll . $allowStaticAssets,
+ '/plugins' => $denyAll . $allowStaticAssets,
+ '/misc/user' => $denyAll . $allowStaticAssets,
);
foreach ($directoriesToProtect as $directoryToProtect => $content) {
self::createHtAccess(PIWIK_INCLUDE_PATH . $directoryToProtect, $overwrite = true, $content);
@@ -67,10 +64,10 @@ class ServerFilesGenerator
// deny access to these folders
$directoriesToProtect = array(
- '/config' => $denyAll . $noDirectoryListing,
- '/core' => $denyAll . $noDirectoryListing,
- '/lang' => $denyAll . $noDirectoryListing,
- '/tmp' => $denyAll . $noDirectoryListing,
+ '/config' => $denyAll,
+ '/core' => $denyAll,
+ '/lang' => $denyAll,
+ '/tmp' => $denyAll,
);
foreach ($directoriesToProtect as $directoryToProtect => $content) {
self::createHtAccess(PIWIK_INCLUDE_PATH . $directoryToProtect, $overwrite = true, $content);
@@ -143,6 +140,8 @@ class ServerFilesGenerator
<staticContent>
<remove fileExtension=".svg" />
<mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
+ <remove fileExtension=".woff" />
+ <mimeMap fileExtension=".woff" mimeType="application/font-woff" />
</staticContent>
</system.webServer>
</configuration>');