Hey folks - really liking Caddy, and while I’m not a huge fan of the configuration syntax, I’ve mostly been able to replicate the nginx config I had before, such that Caddy is now powering the extremely popular Emacs package site melpa.org.
One issue I hit today, though, is that I can’t figure out how to set Cache-Control headers only for certain file types: our Nginx config had something like this:
The closest I can find for Caddy is the “header” directive, which appears to provide only prefix matching for a subpath. Neither the docs nor the tests indicate that there is wildcard or regexp support.
Any idea how I can achieve this with Caddy? Thanks in advance!
Thanks. In the end, we’re back on nginx. We saw erratic errors and stalling with Caddy, some of which were likely due to clashes with Emacs’ URL quirky library, and we didn’t know where to start figuring out what the problem was.