From 74c9319d5c0a2767ff3a2c6a703945f8265cbd1d Mon Sep 17 00:00:00 2001 From: lory <3239225235@qq.com> Date: Fri, 3 Jul 2026 11:45:52 +0800 Subject: [PATCH] fix:face_capature_create_token --- .../templates/authentication/face_capture.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/authentication/templates/authentication/face_capture.html b/apps/authentication/templates/authentication/face_capture.html index 6b9a967d2..17574378e 100644 --- a/apps/authentication/templates/authentication/face_capture.html +++ b/apps/authentication/templates/authentication/face_capture.html @@ -39,7 +39,11 @@ let token; function createFaceCaptureToken() { - const csrf = getCookie('jms_csrftoken'); + let prefix = getCookie('SESSION_COOKIE_NAME_PREFIX'); + if (!prefix || [`""`, `''`].includes(prefix)) { + prefix = ''; + } + const csrf = getCookie(`${prefix}csrftoken`); $.ajax({ url: apiUrl, method: 'POST',