1
0
Fork 0
mirror of https://github.com/Luzifer/password.git synced 2024-12-20 04:41:17 +00:00

Fix: Mime guessing takes only the extension

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2018-12-30 11:30:41 +01:00
parent fdef8bc43c
commit 68e73bbf53
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -80,6 +80,6 @@ func handleAssets(res http.ResponseWriter, r *http.Request) {
return
}
res.Header().Set("Content-Type", mime.TypeByExtension(path.Base(r.URL.Path)))
res.Header().Set("Content-Type", mime.TypeByExtension(path.Ext(r.URL.Path)))
res.Write(buf)
}