mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
Add simple form of cache busting
This commit is contained in:
parent
59cbf95c4f
commit
4616f889fd
8 changed files with 60 additions and 60 deletions
|
@ -1845,12 +1845,12 @@ post "/data_control" do |env|
|
|||
|
||||
sleep 20.seconds
|
||||
env.response.puts %(<meta http-equiv="refresh" content="0; url=#{referer}">)
|
||||
env.response.puts %(<link rel="stylesheet" href="/css/ionicons.min.css">)
|
||||
env.response.puts %(<link rel="stylesheet" href="/css/default.css">)
|
||||
env.response.puts %(<link rel="stylesheet" href="/css/ionicons.min.css?v=<%= CURRENT_COMMIT %>">)
|
||||
env.response.puts %(<link rel="stylesheet" href="/css/default.css?v=<%= CURRENT_COMMIT %>">)
|
||||
if env.get("preferences").as(Preferences).dark_mode
|
||||
env.response.puts %(<link rel="stylesheet" href="/css/darktheme.css">)
|
||||
env.response.puts %(<link rel="stylesheet" href="/css/darktheme.css?v=<%= CURRENT_COMMIT %>">)
|
||||
else
|
||||
env.response.puts %(<link rel="stylesheet" href="/css/lighttheme.css">)
|
||||
env.response.puts %(<link rel="stylesheet" href="/css/lighttheme.css?v=<%= CURRENT_COMMIT %>">)
|
||||
end
|
||||
env.response.puts %(<h3><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3>)
|
||||
env.response.flush
|
||||
|
@ -5351,7 +5351,7 @@ if Kemal.config.ssl
|
|||
end
|
||||
|
||||
static_headers do |response, filepath, filestat|
|
||||
response.headers.add("Cache-Control", "max-age=86400")
|
||||
response.headers.add("Cache-Control", "max-age=2629800")
|
||||
end
|
||||
|
||||
public_folder "assets"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue