As a developer of a web application, I would like content that can be compressed well automatically be compressed by the server.
Example
Currently we check for a number of content types. Users should be allowed to extend this logic to their needs, e.g. via
CompressedContent.Default()
.Selector((IRequest req, IResponse resp) => true/false);
Could also use the existing logic as a fallback (e.g. via CompressedContent.DefaultSelector()), but this should be documented then. Besides this, the following adjustments to the default logic should be added:
- Remove the
.rrd part, this can be custom
- Remove WOFF variants, as they are already compressed
- Add
application/xml,
- Move to logic instead of a list for
+json and +xml and maybe for all text/ and font/* (except woff)
Acceptance criteria
- The rules have been adjusted as described above
- The feature is documented on the GenHTTP website
- The feature is covered by acceptance tests
As a developer of a web application, I would like content that can be compressed well automatically be compressed by the server.
Example
Currently we check for a number of content types. Users should be allowed to extend this logic to their needs, e.g. via
Could also use the existing logic as a fallback (e.g. via
CompressedContent.DefaultSelector()), but this should be documented then. Besides this, the following adjustments to the default logic should be added:.rrdpart, this can be customapplication/xml,+jsonand+xmland maybe for alltext/andfont/*(except woff)Acceptance criteria