Add "headers" helper to make it easier to add headers to response.

This commit is contained in:
Matthew Gerrior 2016-06-16 10:05:28 -04:00
parent c492ede5d3
commit fbbb43dcab
2 changed files with 21 additions and 0 deletions

View file

@ -57,3 +57,7 @@ end
def serve_static(status)
Kemal.config.serve_static = status
end
def headers(env, additional_headers)
env.response.headers.merge!(additional_headers)
end