mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
no cache headers
This commit is contained in:
parent
4ca2e3f443
commit
23b5ba2883
2 changed files with 4 additions and 0 deletions
|
@ -154,6 +154,7 @@ end
|
||||||
|
|
||||||
get %r{\/site_files\/download\/(.+)} do
|
get %r{\/site_files\/download\/(.+)} do
|
||||||
require_login
|
require_login
|
||||||
|
dont_browser_cache
|
||||||
not_found if params[:captures].nil? || params[:captures].length != 1
|
not_found if params[:captures].nil? || params[:captures].length != 1
|
||||||
filename = params[:captures].first
|
filename = params[:captures].first
|
||||||
attachment filename
|
attachment filename
|
||||||
|
|
|
@ -121,6 +121,9 @@ def plan_pricing_button(plan_type)
|
||||||
end
|
end
|
||||||
|
|
||||||
def dont_browser_cache
|
def dont_browser_cache
|
||||||
|
headers['Cache-Control'] = 'private, no-store, max-age=0, no-cache, must-revalidate, post-check=0, pre-check=0'
|
||||||
|
headers['Pragma'] = 'no-cache'
|
||||||
|
headers['Expires'] = 'Fri, 01 Jan 1990 00:00:00 GMT'
|
||||||
@dont_browser_cache = true
|
@dont_browser_cache = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue