fix: SSO access to web assets with encrypted password auto-filling

This commit is contained in:
jiangweidong 2025-07-04 17:38:45 +08:00 committed by 老广
parent 9bdfab966f
commit 99c4622ccb

View File

@ -120,7 +120,10 @@ class SessionCookieMiddleware(MiddlewareMixin):
USER_LOGIN_ENCRYPTION_KEY_PAIR = 'user_login_encryption_key_pair'
def set_cookie_public_key(self, request, response):
if request.path.startswith('/api'):
whitelist = [
'/api/v1/authentication/sso/login/',
]
if request.path.startswith('/api') and request.path not in whitelist:
return
session_public_key_name = settings.SESSION_RSA_PUBLIC_KEY_NAME