Skip to content

Commit

Permalink
Directory Listing: Add UTF-8 Charset to the response Content type (#679)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkutsan committed May 7, 2024
1 parent 52ab623 commit e69bd40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/kemal/static_file_handler.cr
Expand Up @@ -57,7 +57,7 @@ module Kemal
end
send_file(context, file_path)
elsif config.is_a?(Hash) && config.fetch("dir_listing", false)
context.response.content_type = "text/html"
context.response.content_type = "text/html;charset=UTF-8;"
directory_listing(context.response, request_path, file_path)
else
call_next(context)
Expand Down

0 comments on commit e69bd40

Please sign in to comment.