From e22d6d8549ee95c755b3f6a6fdee52cb0053252e Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Fri, 9 Mar 2018 11:28:57 -0600 Subject: [PATCH] Add max-age for static assets --- src/invidious.cr | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/invidious.cr b/src/invidious.cr index aa67dad8..cdd0b50a 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -315,6 +315,10 @@ error 500 do |env| templated "error" end +static_headers do |response, filepath, filestat| + response.headers.add("Cache-Control", "max-age=86400") +end + public_folder "assets" Kemal.run