Skip to content

Commit

Permalink
fixup! mozillaGH-72 Add FormattedPolicyCSPMiddleware
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanYoung committed May 25, 2022
1 parent 12c807d commit 62216df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion csp/contrib/formatted_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def build_policy(self, request, response):
formatters = getattr(
settings,
'CSP_POLICY_FORMATTERS',
{'host': lambda request, response: request.META['HTTP_HOST']},
{'host': lambda request, response: request.get_host()},
)
all_replacements = {}
for (csp, report_only, exclude_prefixes) in super().build_policy(
Expand Down

0 comments on commit 62216df

Please sign in to comment.