I'm hitting a bug that I don't fully grasp yet: when a 304 response is being served it contains no Content-Type header. As I set X-Content-Type-Options: nosniff browsers refuse to use the resource (css, js...) and the page is displayed unstyled.
Since I use Caddy and the plugin cache I'm not exactly sure where the problem comes from but it seems that adding the package mailcap to the docker build fixes the problem. This package contains /etc/mime.types that Caddy can use to map files to the correct Content-Type.
After investigating, my original problem is not related to /etc/mime.types. However adding this file would still solve the issue I linked, so maybe it's worth keeping this one open.
I'm hitting a bug that I don't fully grasp yet: when a
304
response is being served it contains noContent-Type
header. As I setX-Content-Type-Options: nosniff
browsers refuse to use the resource (css, js...) and the page is displayed unstyled.Since I use Caddy and the plugin
cache
I'm not exactly sure where the problem comes from but it seems that adding the packagemailcap
to the docker build fixes the problem. This package contains/etc/mime.types
that Caddy can use to map files to the correctContent-Type
.