
我在 gzip_type 、brotli_type 中添加了 font/ttf ,但是发现并没有起作用,这是为什么呢?
1 Lax 2022-09-25 11:27:13 +08:00 先下载那个文件看看 content type 头是什么,在配置文件目录下的 mime.types 里看看配置没有 |
2 ililili OP @Lax 是 application/octet-stream ,mime.types 里面有 application/octet-stream 但是没有 ttf ,我添加了还是不行。 |
3 Lax 2022-09-25 16:15:32 +08:00 按你这个配置,下载时是 application/octet-stream 不对。应该在 mime.types 把字体文件设置成 font/ttf 才会生效 |