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:
authorThomas Steur <tsteur@users.noreply.github.com>2019-01-22 02:32:09 +0300
committerdiosmosis <diosmosis@users.noreply.github.com>2019-01-22 02:32:09 +0300
commit3dce94b48ccf851f80b94d2cb9be45aacb954875 (patch)
treefa872d59bc24a35f0414147db3992ed8a3b4d571 /plugins/Installation
parent5971154fb0bccb4c28c590734765b43ee2b92256 (diff)
Don't cache tag manager preview files (#13977)
* Don't cache tag manager preview files Not sure if this will work across apache versions? Tested on Apache 2.2 Prevents preview files from being cached in the browser and that always the newest version will be served. refs https://github.com/matomo-org/tag-manager/pull/150 * Update ServerFilesGenerator.php
Diffstat (limited to 'plugins/Installation')
-rw-r--r--plugins/Installation/ServerFilesGenerator.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/Installation/ServerFilesGenerator.php b/plugins/Installation/ServerFilesGenerator.php
index 5a909845c5..48a67f9349 100644
--- a/plugins/Installation/ServerFilesGenerator.php
+++ b/plugins/Installation/ServerFilesGenerator.php
@@ -51,8 +51,16 @@ class ServerFilesGenerator
$allow . "\n" .
"</Files>\n";
+ $noCachePreview = "
+# do not cache preview container files
+<Files ~ \"^container_.*_preview\.js$\">
+<IfModule mod_headers.c>
+Header set Cache-Control \"Cache-Control: private, no-cache, no-store\"
+</IfModule>
+</Files>";
+
$directoriesToProtect = array(
- '/js' => $allowAny,
+ '/js' => $allowAny . $noCachePreview,
'/libs' => $denyAll . $allowStaticAssets,
'/vendor' => $denyAll . $allowStaticAssets,
'/plugins' => $denyAll . $allowStaticAssets,