poprawki w autoryzacji

This commit is contained in:
Mateusz Gruszczyński
2025-07-11 11:02:43 +02:00
parent 7aa5c43c5a
commit 18c34d8093
3 changed files with 7 additions and 3 deletions

5
app.py
View File

@@ -251,6 +251,11 @@ def inject_time():
def inject_has_authorized_cookie():
return {'has_authorized_cookie': 'authorized' in request.cookies}
@app.context_processor
def inject_is_blocked():
ip = request.access_route[0]
return {'is_blocked': is_ip_blocked(ip)}
@app.before_request
def require_system_password():