-
-
Notifications
You must be signed in to change notification settings - Fork 109
Description
Not sure if this is the right place to ask but is it possible to support static compressed files: For example if a request is received for http://localhost/bundle.js with Accept-Encoding: brotli, I want to serve the already compressed bundle.js.br instead of compressing bundle.js on the fly. Same if gzip compression is requested, I'd want fastify-static to send bundle.js.gz if it exists. For my goal if the pre-compressed file does not exist then I'd want to send the uncompressed file, lack of pre-compressed file would mean that the build system determined that the compressed file was actually larger.
Am I correct that for fastify-static to support this it would need to be supported by send? They have a PR to add this feature but it appears to have stalled.