The encode directive for zstd/gzip compression matches on a list of content types. The defaults are shown in the documentation.
If you want to add additional content types to this list you have to cut and paste the entire list in your matcher to include the default ones and so it ends up looking like the below just because I’ve added two new types. This also means that I have to keep an eye on the defaults in case they change.
Is there any way to simplify this, or could it maybe be a feature request to do something like prefix them with + to indicate they get added to the defaults rather than replace the defaults?
encode zstd gzip {
match {
header Content-Type application/atom+xml*
header Content-Type application/eot*
header Content-Type application/font*
header Content-Type application/geo+json*
header Content-Type application/graphql+json*
header Content-Type application/javascript*
header Content-Type application/json*
header Content-Type application/ld+json*
header Content-Type application/manifest+json*
header Content-Type application/opentype*
header Content-Type application/otf*
header Content-Type application/rss+xml*
header Content-Type application/truetype*
header Content-Type application/ttf*
header Content-Type application/vnd.api+json*
header Content-Type application/vnd.ms-fontobject*
header Content-Type application/wasm*
header Content-Type application/x-httpd-cgi*
header Content-Type application/x-javascript*
header Content-Type application/x-opentype*
header Content-Type application/x-otf*
header Content-Type application/x-perl*
header Content-Type application/x-protobuf*
header Content-Type application/x-ttf*
header Content-Type application/xhtml+xml*
header Content-Type application/xml*
header Content-Type font/ttf*
header Content-Type font/otf*
header Content-Type image/svg+xml*
header Content-Type image/vnd.microsoft.icon*
header Content-Type image/x-icon*
header Content-Type multipart/bag*
header Content-Type multipart/mixed*
header Content-Type text/*
header Content-Type application/feed+json*
header Content-Type application/gpx+xml*
}
}