Is there a strong need for Caddy to implement this functionality itself? What does it look like when you generate gzip files with a Caddy command vs. using a bash script?
It really looks to me like it’s the kind of thing you’d want to set up with a cron job or inotify-tools, or otherwise manage carefully yourself either way?
Caddy does a good job serving pre-compressed files efficiently. For every .css, .js, .html etc file, make sure there is a corresponding gz file too. Those users who can accept these compressed files (i.e. almost everybody) will get the pre-compressed files. This saves time: less disk i/o, less memory footprint, less network traffic; big win!
And the webserver CPU doesn’t do any of the hard work! Big win all round.
Ideally, you would not need to use the gzip module and would rely entirely on everything textual being pre-compressed by offline scripts etc. Obviously, for some situations, this ideal isn’t always possible, depending on circumstances. So the gzip module will remain as a useful second-best.