Skip to content

Commit

Permalink
Add Date header to HTTP responses
Browse files Browse the repository at this point in the history
  • Loading branch information
Sija committed Apr 3, 2024
1 parent 7c47bbc commit a9bd09b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/kemal/init_handler.cr
Expand Up @@ -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.utc.to_rfc2822
call_next context
end
end
Expand Down

0 comments on commit a9bd09b

Please sign in to comment.