diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-03-09 11:28:57 -0600 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-03-09 11:28:57 -0600 |
| commit | e22d6d8549ee95c755b3f6a6fdee52cb0053252e (patch) | |
| tree | 04fe1e139d7d88b074e88a5c7f1349491ef0e75f | |
| parent | cb22d7423c8f9c0bed758fea009b284c67903407 (diff) | |
| download | invidious-e22d6d8549ee95c755b3f6a6fdee52cb0053252e.tar.gz invidious-e22d6d8549ee95c755b3f6a6fdee52cb0053252e.tar.bz2 invidious-e22d6d8549ee95c755b3f6a6fdee52cb0053252e.zip | |
Add max-age for static assets
| -rw-r--r-- | src/invidious.cr | 4 |
1 files changed, 4 insertions, 0 deletions
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 |
