Enabling templates for .html (or just with default settings) breaks the mime types of JSON files in the paths it is enabled for. They’re all served as text/plain; charset=utf-8
Plot twist : I can’t reproduce this with Caddy 1.0.0 on my Mac, I only have this problem with the popular abiosoft/caddy-docker Docker image (so, I don’t know if it’s a Linux specific problem or due to the way it’s built)
Rebuilding the Abiosoft container without any plugins, to match the vanilla Caddy I’m using on Mac (they now both output the exact same version and plugins). Didn’t work.
Forcing/not forcing the type with the mime directive. Didn’t work.
Explicitly setting templates / .html and using the long form with path / ext / between. Didn’t work.
Restricting templates to a subpath like this : templates /subdir .html. This works : JSON files outside of that path are now served correctly. But I can’t use that because I need my index templated !