Update version and add Date header to response

This commit is contained in:
Loïc Tosser 2023-12-27 08:37:39 +04:00
parent 13fd4f8b2f
commit f0918ce8f4
2 changed files with 3 additions and 2 deletions

View file

@ -1,5 +1,5 @@
name: kemal
version: 1.4.0
version: 1.4.1
authors:
- Serdar Dogruyol <dogruyolserdar@gmail.com>
@ -10,7 +10,7 @@ dependencies:
version: ~> 0.4.0
exception_page:
github: crystal-loot/exception_page
version: ~> 0.3.0
version: ~> 0.4.0
development_dependencies:
ameba:

View file

@ -9,6 +9,7 @@ module Kemal
def call(context : HTTP::Server::Context)
context.response.headers.add "X-Powered-By", "Kemal" if Kemal.config.powered_by_header?
context.response.content_type = "text/html" unless context.response.headers.has_key?("Content-Type")
context.response.headers.add "Date", Time.local.to_rfc2822
call_next context
end
end