no cache headers

This commit is contained in:
Kyle Drake 2016-07-29 14:51:33 -07:00
parent 4ca2e3f443
commit 23b5ba2883
2 changed files with 4 additions and 0 deletions

View file

@ -154,6 +154,7 @@ end
get %r{\/site_files\/download\/(.+)} do
require_login
dont_browser_cache
not_found if params[:captures].nil? || params[:captures].length != 1
filename = params[:captures].first
attachment filename

View file

@ -121,6 +121,9 @@ def plan_pricing_button(plan_type)
end
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
end