|
13 | 13 | # https://nginx.org/en/docs/http/ngx_http_headers_module.html#expires |
14 | 14 |
|
15 | 15 | map $sent_http_content_type $expires { |
16 | | - default 1M; |
| 16 | + default 1M; |
17 | 17 |
|
18 | 18 | # CSS |
19 | | - text/css 1y; |
| 19 | + ~*text/css 1y; |
20 | 20 |
|
21 | 21 | # Data interchange |
22 | | - application/atom+xml 1h; |
23 | | - application/rdf+xml 1h; |
24 | | - application/rss+xml 1h; |
25 | | - |
26 | | - application/json 0; |
27 | | - application/ld+json 0; |
28 | | - application/schema+json 0; |
29 | | - application/geo+json 0; |
30 | | - application/xml 0; |
31 | | - text/calendar 0; |
32 | | - text/xml 0; |
| 22 | + ~*application/atom+xml 1h; |
| 23 | + ~*application/rdf+xml 1h; |
| 24 | + ~*application/rss+xml 1h; |
| 25 | + |
| 26 | + ~*application/json 0; |
| 27 | + ~*application/ld+json 0; |
| 28 | + ~*application/schema+json 0; |
| 29 | + ~*application/geo+json 0; |
| 30 | + ~*application/xml 0; |
| 31 | + ~*text/calendar 0; |
| 32 | + ~*text/xml 0; |
33 | 33 |
|
34 | 34 | # Favicon (cannot be renamed!) and cursor images |
35 | | - image/vnd.microsoft.icon 1w; |
36 | | - image/x-icon 1w; |
| 35 | + ~*image/vnd.microsoft.icon 1w; |
| 36 | + ~*image/x-icon 1w; |
37 | 37 |
|
38 | 38 | # HTML |
39 | | - text/html 0; |
| 39 | + ~*text/html 0; |
40 | 40 |
|
41 | 41 | # JavaScript |
42 | | - application/javascript 1y; |
43 | | - application/x-javascript 1y; |
44 | | - text/javascript 1y; |
| 42 | + ~*application/javascript 1y; |
| 43 | + ~*application/x-javascript 1y; |
| 44 | + ~*text/javascript 1y; |
45 | 45 |
|
46 | 46 | # Manifest files |
47 | | - application/manifest+json 1w; |
48 | | - application/x-web-app-manifest+json 0; |
49 | | - text/cache-manifest 0; |
50 | | - |
| 47 | + ~*application/manifest+json 1w; |
| 48 | + ~*application/x-web-app-manifest+json 0; |
| 49 | + ~*text/cache-manifest 0; |
51 | 50 |
|
52 | 51 | # Markdown |
53 | | - text/markdown 0; |
| 52 | + ~*text/markdown 0; |
54 | 53 |
|
55 | 54 | # Media files |
56 | | - audio/ogg 1M; |
57 | | - image/bmp 1M; |
58 | | - image/gif 1M; |
59 | | - image/jpeg 1M; |
60 | | - image/png 1M; |
61 | | - image/svg+xml 1M; |
62 | | - image/webp 1M; |
63 | | - video/mp4 1M; |
64 | | - video/ogg 1M; |
65 | | - video/webm 1M; |
| 55 | + ~*audio/.* 1M; |
| 56 | + ~*image/.* 1M; |
| 57 | + ~*video/.* 1M; |
66 | 58 |
|
67 | 59 | # WebAssembly |
68 | | - application/wasm 1y; |
| 60 | + ~*application/wasm 1y; |
69 | 61 |
|
70 | 62 | # Web fonts |
71 | | - font/collection 1M; |
72 | | - application/vnd.ms-fontobject 1M; |
73 | | - font/eot 1M; |
74 | | - font/opentype 1M; |
75 | | - font/otf 1M; |
76 | | - application/x-font-ttf 1M; |
77 | | - font/ttf 1M; |
78 | | - application/font-woff 1M; |
79 | | - application/x-font-woff 1M; |
80 | | - font/woff 1M; |
81 | | - application/font-woff2 1M; |
82 | | - font/woff2 1M; |
| 63 | + ~*font/.* 1M; |
| 64 | + ~*application/vnd.ms-fontobject 1M; |
| 65 | + ~*application/x-font-ttf 1M; |
| 66 | + ~*application/x-font-woff 1M; |
| 67 | + ~*application/font-woff 1M; |
| 68 | + ~*application/font-woff2 1M; |
83 | 69 |
|
84 | 70 | # Other |
85 | | - text/x-cross-domain-policy 1w; |
| 71 | + ~*text/x-cross-domain-policy 1w; |
86 | 72 | } |
87 | 73 |
|
88 | 74 | expires $expires; |
0 commit comments