6c1a0f713b2c74e06a0391c18e1a3cdb153562aa
This PR contains the work done to add cache-control headers to static file responses by configuring the `FileMiddleware` middleware to tag served static files with *Cache-Control* directives, tuned per media type. To provide further details about the work done: * Added a cache control that sets per-type policies: text assets (CSS/JS) get public, max-age, must-revalidate; images get public, max-age; everything else gets a default public, max-age. * Files stay validated via `ETag/Last-Modified` header. * Made the max-age values configurable, with defaults, via new cache constants. Reviewed-on: rock-n-code/loud-amsterdam#6 Co-authored-by: Javier Cicchelli <javier@rock-n-code.com> Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
Languages
Swift
96%
Dockerfile
1.5%
CSS
1.4%
Makefile
1.1%