Skip to content

Commit

Permalink
adds basicauth middleware and allows api
Browse files Browse the repository at this point in the history
  • Loading branch information
awdem committed Oct 1, 2024
1 parent 7051255 commit 72ca1d9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ynr/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ def root(*path):
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"candidates.middleware.DisableCachingForAuthenticatedUsers",
"wombles.middleware.CheckProfileDetailsMiddleware",
"dc_utils.middleware.BasicAuthMiddleware",
)

AUTHENTICATION_BACKENDS = (
Expand Down Expand Up @@ -501,3 +502,9 @@ def _is_running_tests():
from .testing import * # noqa
else:
RUNNING_TESTS = False

# Allowlist of URLs that should be ignored by dc_utils BasicAuthMiddleware
BASIC_AUTH_ALLOWLIST = [
"/api",
"/api/*",
]

0 comments on commit 72ca1d9

Please sign in to comment.