Интегрирован wesp в сайт
CI / quality (push) Canceled after 0s

This commit is contained in:
влад
2026-07-17 12:57:18 +03:00
parent 5dfa06ddbe
commit 355c0ef9f1
883 changed files with 194576 additions and 177 deletions
+21
View File
@@ -0,0 +1,21 @@
"""Cookie терминала киоска (wesp_kiosk_device_id)."""
from flask import current_app
COOKIE_NAME = "wesp_kiosk_device_id"
def kiosk_cookie_max_age() -> int:
return int(current_app.config.get("KIOSK_AUTH_COOKIE_DAYS", 30)) * 24 * 3600
def set_kiosk_device_cookie(response, device_id: str):
"""Привязать браузер к конкретному KioskDevice."""
response.set_cookie(
COOKIE_NAME,
device_id,
max_age=kiosk_cookie_max_age(),
httponly=True,
samesite="Lax",
)
return response