fix: no-cache заголовки (Cache-Control, Pragma, Expires) — F5 больше не кэширует
Deploy drhider / validate (push) Waiting to run

This commit is contained in:
2026-07-12 13:11:48 +04:00
parent f15af2866d
commit 59f7601266
2 changed files with 12 additions and 1 deletions
+9 -1
View File
@@ -20,7 +20,7 @@ if _sys_path_root not in sys.path:
sys.path.insert(0, _sys_path_root)
# Версия приложения (меняется при изменениях)
VERSION = "3.2.3"
VERSION = "3.2.4"
def create_app():
@@ -45,6 +45,14 @@ def create_app():
register_routes(app)
# Запрещаем кэширование — F5 всегда грузит свежую страницу
@app.after_request
def no_cache(response):
response.headers["Cache-Control"] = "no-cache, no-store, must-revalidate"
response.headers["Pragma"] = "no-cache"
response.headers["Expires"] = "0"
return response
return app
+3
View File
@@ -3,6 +3,9 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
<title>DrHider — обфускация документов</title>
<link rel="icon" type="image/svg+xml" href="/static/favicon.svg">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>