Fix content-type for rss feeds
This commit is contained in:
@@ -20,9 +20,9 @@ end
|
||||
|
||||
require "adamantium/middleware/header_fix"
|
||||
use Adamantium::Middleware::HeaderFix do |headers, env|
|
||||
# if env["REQUEST_METHOD"] == "HEAD"
|
||||
headers["Content-Type"] = "text/html; charset=utf-8"
|
||||
# end
|
||||
unless headers["Content-Type"].include? "xml"
|
||||
headers["Content-Type"] = "text/html; charset=utf-8"
|
||||
end
|
||||
end
|
||||
|
||||
run Hanami.app
|
||||
|
Reference in New Issue
Block a user