mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Add Date
header to HTTP responses
This commit is contained in:
parent
7c47bbc150
commit
a9bd09b122
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue