feat: Update insert login_required middleware to allow auth middleware (#1082)

This commit is contained in:
David 2025-01-22 20:54:25 +08:00 committed by GitHub
parent 02d9188aa1
commit 1b960b28f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -488,7 +488,7 @@ else:
if GLOBAL_LOGIN_REQUIRED: if GLOBAL_LOGIN_REQUIRED:
# this should go after the AuthenticationMiddleware middleware # this should go after the AuthenticationMiddleware middleware
MIDDLEWARE.insert(5, "login_required.middleware.LoginRequiredMiddleware") MIDDLEWARE.insert(6, "login_required.middleware.LoginRequiredMiddleware")
LOGIN_REQUIRED_IGNORE_PATHS = [ LOGIN_REQUIRED_IGNORE_PATHS = [
r'/accounts/login/$', r'/accounts/login/$',
r'/accounts/logout/$', r'/accounts/logout/$',