小编Dra*_*lue的帖子

在NGINX中使用带有"通配符"媒体类型的gzip_types/ssi_types

我们有一个应用程序,服务与媒体类型JSON:application/vnd.example.v1.0+jsonapplication/vnd.example.v2.0+json等.

如果我们想使用nginx的http://nginx.org/en/docs/http/ngx_http_ssi_module.html#ssi_typeshttp://nginx.org/en/docs/http/ngx_http_gzip_module.html#gzip_types.我们是否必须附加每个可能的版本号或者是否存在类似通配符的内容?

代替:

gzip_types "application/vnd.example.v1.0+json" "application/vnd.example.v2.0+json" "application/vnd.example.v3.0+json"
Run Code Online (Sandbox Code Playgroud)

是这样的

gzip_types "application/vnd.example*+json"
Run Code Online (Sandbox Code Playgroud)

可能?

nginx

5
推荐指数
1
解决办法
490
查看次数

标签 统计

nginx ×1