Skip to content

Commit

Permalink
Allow session authentication in debug mode
Browse files Browse the repository at this point in the history
This allows using the browsable API in debug mode
  • Loading branch information
nas-tabchiche committed May 6, 2024
1 parent 2f33285 commit 3d0f238
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backend/ciso_assistant/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ def set_ciso_assistant_url(_, __, event_dict):
REST_FRAMEWORK["DEFAULT_RENDERER_CLASSES"].append(
"rest_framework.renderers.BrowsableAPIRenderer"
)
# Add session authentication to allow using the browsable API
REST_FRAMEWORK["DEFAULT_AUTHENTICATION_CLASSES"].append(
"rest_framework.authentication.SessionAuthentication"
)

INSTALLED_APPS.append("django.contrib.staticfiles")
STATIC_URL = "/static/"
Expand Down

0 comments on commit 3d0f238

Please sign in to comment.