Browse Source

debian: improve compressions + add expire headers

* Improve compressions + add expire headers
* Remove MSIE check, caching only for versioned files, do not gzip MP3/JPG/PNG
* Lower GZIP min length, enable compressions on WASM
j8
Niek van der Maas 4 years ago
parent
commit
8d2a52d0e8
No account linked to committer's email address

+ 8
- 1
doc/debian/jitsi-meet/jitsi-meet.example View File

@@ -45,8 +45,10 @@ server {
45 45
     error_page 404 /static/404.html;
46 46
 
47 47
     gzip on;
48
-    gzip_types text/plain text/css application/javascript application/json;
48
+    gzip_types text/plain text/css application/javascript application/json image/x-icon application/octet-stream application/wasm;
49 49
     gzip_vary on;
50
+    gzip_proxied no-cache no-store private expired auth;
51
+    gzip_min_length 512;
50 52
 
51 53
     location = /config.js {
52 54
         alias /etc/jitsi/meet/jitsi-meet.example.com-config.js;
@@ -61,6 +63,11 @@ server {
61 63
     {
62 64
         add_header 'Access-Control-Allow-Origin' '*';
63 65
         alias /usr/share/jitsi-meet/$1/$2;
66
+
67
+        # cache all versioned files
68
+        if ($arg_v) {
69
+          expires 1y;
70
+        }
64 71
     }
65 72
 
66 73
     # BOSH

+ 6
- 0
doc/example-config-files/jitsi.example.com.example View File

@@ -14,6 +14,12 @@ server {
14 14
         ssi on;
15 15
     }
16 16
 
17
+    gzip on;
18
+    gzip_types text/plain text/css application/javascript application/json image/x-icon application/octet-stream application/wasm;
19
+    gzip_vary on;
20
+    gzip_proxied no-cache no-store private expired auth;
21
+    gzip_min_length 512;
22
+
17 23
     # BOSH
18 24
     location /http-bind {
19 25
         proxy_pass      http://localhost:5280/http-bind;

+ 6
- 0
doc/example-config-files/multidomain/jitsi.example.com.multidomain.example View File

@@ -28,6 +28,12 @@ server {
28 28
         tcp_nodelay on;
29 29
     }
30 30
 
31
+    gzip on;
32
+    gzip_types text/plain text/css application/javascript application/json image/x-icon application/octet-stream application/wasm;
33
+    gzip_vary on;
34
+    gzip_proxied no-cache no-store private expired auth;
35
+    gzip_min_length 512;
36
+
31 37
     location ~ ^/([^/?&:'"]+)$ {
32 38
         try_files $uri @root_path;
33 39
     }

Loading…
Cancel
Save