diff --git a/app/routes.py b/app/routes.py index c71972c6d8cb125e1b00484ef1a8f28efbd98b60..c02170852df420f0ad563ddd9cb2f26bf48229c1 100644 --- a/app/routes.py +++ b/app/routes.py @@ -2,15 +2,25 @@ from os.path import join from flask import render_template, send_from_directory from app import app - PLOTS_PATH = "../plots" - PLOTS = [ - ['dom_activity', 'dom_rates'], - ['pmt_rates', 'pmt_hrv'], - ['trigger_rates'], - ] + ['dom_activity', 'dom_rates'], + ['pmt_rates', 'pmt_hrv'], + ['trigger_rates'], +] + + +@app.after_request +def add_header(r): + """ + Disable caches. + """ + r.headers["Cache-Control"] = "no-cache, no-store, must-revalidate" + r.headers["Pragma"] = "no-cache" + r.headers["Expires"] = "0" + r.headers["Cache-Control"] = "public, max-age=0" + return r @app.route('/')