From d81334026bf992b36d586e7ec442c7a9c2732d3a Mon Sep 17 00:00:00 2001 From: Leeingnyo Date: Sat, 6 Feb 2021 16:58:49 +0900 Subject: [PATCH] add MIME type of ico file The server returns 500 error when requested '/favion.ico' The handler worked fine, but send_file has failed with - Missing MIME type for extension ".ico" so I register mime type for .ico file --- src/util/util.cr | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/util.cr b/src/util/util.cr index 873a226f..d2e73c53 100644 --- a/src/util/util.cr +++ b/src/util/util.cr @@ -27,6 +27,7 @@ def register_mime_types ".rar" => "application/x-rar-compressed", ".cbz" => "application/vnd.comicbook+zip", ".cbr" => "application/vnd.comicbook-rar", + ".ico" => "image/x-icon", }.each do |k, v| MIME.register k, v end