Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Commit

Permalink
Set BASIC_AUTH_DISABLE_CONSUMING_AUTHORIZATION_HEADER = True
Browse files Browse the repository at this point in the history
Wagtail requires Authorization header to be present
for the previews
  • Loading branch information
engineervix committed Jul 20, 2023
1 parent bf78373 commit a3d53cf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tbx/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,6 @@
is_in_shell = len(sys.argv) > 1 and sys.argv[1] in ["shell", "shell_plus"]

if "SENTRY_DSN" in env and not is_in_shell:

import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration
from sentry_sdk.utils import get_default_release
Expand Down Expand Up @@ -471,6 +470,10 @@
MIDDLEWARE.insert(0, "baipw.middleware.BasicAuthIPWhitelistMiddleware")
BASIC_AUTH_LOGIN = env.get("BASIC_AUTH_LOGIN")
BASIC_AUTH_PASSWORD = env.get("BASIC_AUTH_PASSWORD")

# Wagtail requires Authorization header to be present for the previews
BASIC_AUTH_DISABLE_CONSUMING_AUTHORIZATION_HEADER = True

BASIC_AUTH_WHITELISTED_IP_NETWORKS = [
# Torchbox networks.
"78.32.251.192/28",
Expand Down

0 comments on commit a3d53cf

Please sign in to comment.