How to stop caddy sniffing mime types and return a default mime type

I had a go with this with caddy2

$ HEAD http://127.0.0.1:8080/test-no-extension
200 OK
Connection: close
Date: Sat, 18 Jan 2020 09:34:47 GMT
Accept-Ranges: bytes
ETag: "q48ybs6"
Server: Caddy
Content-Length: 6
Last-Modified: Fri, 17 Jan 2020 10:26:16 GMT
Client-Date: Sat, 18 Jan 2020 09:34:47 GMT
Client-Peer: 127.0.0.1:8080
Client-Response-Num: 1

It doesn’t read the file which is excellent :slight_smile: It doesn’t provide the Content-Type in the HEAD request which seems like a good compromise to me.

I’m gong to mark this thread as fixed - upgrade to caddy 2 being the answer!

1 Like