abiosoft / caddy-docker

Docker container for Caddy
https://hub.docker.com/r/abiosoft/caddy/
MIT License
768 stars 315 forks source link

Consider adding /etc/mime.types to Docker image #193

Closed NicolasLM closed 5 years ago

NicolasLM commented 5 years ago

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.

NicolasLM commented 5 years ago

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.

abiosoft commented 5 years ago

Fixed with https://github.com/abiosoft/caddy-docker/pull/202