[matomo-web] nginx: Bump compression



commit c16c167d8e243b451549fc26ddf263798ec56dc7
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date:   Wed Dec 30 08:28:39 2020 +0100

    nginx: Bump compression

 nginx/nginx.conf | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/nginx/nginx.conf b/nginx/nginx.conf
index 463eb92..0909aa1 100644
--- a/nginx/nginx.conf
+++ b/nginx/nginx.conf
@@ -20,7 +20,7 @@ http {
 
   gzip on;
   gzip_types application/javascript;
-  gzip_comp_level 6;
+  gzip_comp_level 9;
 
   upstream php-handler {
     server localhost:9000;
@@ -40,6 +40,10 @@ http {
     root /var/www/html/;
     index index.php;
 
+    add_header Referrer-Policy origin always; # make sure outgoing links don't show the URL to the Matomo 
instance
+    add_header X-Content-Type-Options "nosniff" always;
+    add_header X-XSS-Protection "1; mode=block" always;
+
     ## Try all locations and relay to index.php as a fallback.
     location / {
 
@@ -84,7 +88,7 @@ http {
     }
 
     ## Relay all index.php requests to fastcgi.
-    location ~ ^/(index|piwik|matomo)\.php {
+    location ~ ^/(index|piwik|matomo|js/index|plugins/HeatmapSessionRecording/configs)\.php {
         fastcgi_split_path_info ^(.+\.php)(/.*)$;
         include fastcgi_params;
         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]