1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Add support for DRF token authentication

This commit is contained in:
jeremystretch
2021-06-25 09:13:08 -04:00
parent 91d39cc0c0
commit d5675a5d4a
4 changed files with 44 additions and 2 deletions

View File

@ -24,7 +24,8 @@ class LoginRequiredMiddleware(object):
if settings.LOGIN_REQUIRED and not request.user.is_authenticated:
# Determine exempt paths
exempt_paths = [
reverse('api-root')
reverse('api-root'),
reverse('graphql'),
]
if settings.METRICS_ENABLED:
exempt_paths.append(reverse('prometheus-django-metrics'))