浏览代码

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 年前
父节点
当前提交
8d2a52d0e8
没有帐户链接到提交者的电子邮件

+ 8
- 1
doc/debian/jitsi-meet/jitsi-meet.example 查看文件

45
     error_page 404 /static/404.html;
45
     error_page 404 /static/404.html;
46
 
46
 
47
     gzip on;
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
     gzip_vary on;
49
     gzip_vary on;
50
+    gzip_proxied no-cache no-store private expired auth;
51
+    gzip_min_length 512;
50
 
52
 
51
     location = /config.js {
53
     location = /config.js {
52
         alias /etc/jitsi/meet/jitsi-meet.example.com-config.js;
54
         alias /etc/jitsi/meet/jitsi-meet.example.com-config.js;
61
     {
63
     {
62
         add_header 'Access-Control-Allow-Origin' '*';
64
         add_header 'Access-Control-Allow-Origin' '*';
63
         alias /usr/share/jitsi-meet/$1/$2;
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
     # BOSH
73
     # BOSH

+ 6
- 0
doc/example-config-files/jitsi.example.com.example 查看文件

14
         ssi on;
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
     # BOSH
23
     # BOSH
18
     location /http-bind {
24
     location /http-bind {
19
         proxy_pass      http://localhost:5280/http-bind;
25
         proxy_pass      http://localhost:5280/http-bind;

+ 6
- 0
doc/example-config-files/multidomain/jitsi.example.com.multidomain.example 查看文件

28
         tcp_nodelay on;
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
     location ~ ^/([^/?&:'"]+)$ {
37
     location ~ ^/([^/?&:'"]+)$ {
32
         try_files $uri @root_path;
38
         try_files $uri @root_path;
33
     }
39
     }

正在加载...
取消
保存