Directory Listing: Add UTF-8 Charset to the response Content type (#679)

This commit is contained in:
Alexander Kutsan 2024-05-07 16:11:38 +04:00 committed by GitHub
parent 52ab623c50
commit e69bd400b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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)