[Feature] Move Login exempt urls to settings (#86)

Co-authored-by: Tim Lorsbach <tim@lorsba.ch>
Reviewed-on: enviPath/enviPy#86
This commit is contained in:
2025-09-05 08:04:20 +12:00
parent aa3b53e94b
commit 498a53ab3d
2 changed files with 6 additions and 1 deletions

View File

@ -341,3 +341,9 @@ FLAGS = {
'ENVIFORMER': ENVIFORMER_PRESENT, 'ENVIFORMER': ENVIFORMER_PRESENT,
'APPLICABILITY_DOMAIN': APPLICABILITY_DOMAIN_ENABLED, 'APPLICABILITY_DOMAIN': APPLICABILITY_DOMAIN_ENABLED,
} }
LOGIN_EXEMPT_URLS = [
'/api/legacy/',
'/o/token/',
'/o/userinfo/',
]

View File

@ -11,7 +11,6 @@ class LoginRequiredMiddleware:
reverse('logout'), reverse('logout'),
reverse('admin:login'), reverse('admin:login'),
reverse('admin:index'), reverse('admin:index'),
'/api/legacy/'
] + getattr(settings, 'LOGIN_EXEMPT_URLS', []) ] + getattr(settings, 'LOGIN_EXEMPT_URLS', [])
def __call__(self, request): def __call__(self, request):