Fix HEAD response header for brid.gy

This commit is contained in:
2023-12-20 22:35:27 +11:00
parent 019b1bab4b
commit a7678abe92
6 changed files with 41 additions and 2 deletions

View File

@@ -22,6 +22,10 @@ module Adamantium
handle_exception ROM::TupleCountMismatchError => :not_found
handle_exception StandardError => :handle_error
config.default_headers = {
"Content-Type" => "text/html"
}
def cache(key:, content:)
cacher.call(key: key, content: content, expiry: TimeMath.min.advance(Time.now, +10))
end