We have an application, serving json with media type: application/vnd.example.v1.0+json
and application/vnd.example.v2.0+json
and so on.
If we want to use nginx's http://nginx.org/en/docs/http/ngx_http_ssi_module.html#ssi_types and http://nginx.org/en/docs/http/ngx_http_gzip_module.html#gzip_types. Do we have to append every possible version number or is there something like a wildcard?
Instead of:
gzip_types "application/vnd.example.v1.0+json" "application/vnd.example.v2.0+json" "application/vnd.example.v3.0+json"
is something like
gzip_types "application/vnd.example*+json"
possible?
According to NGINX source code src/http/ngx_http.c
:
if (value[i].len == 1 && value[i].data[0] == '*') {
No, you can't
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With