Skip to content

Commit

Permalink
fixup! mozillaGH-36 Update middleware for multi-policy support
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanYoung committed May 25, 2022
1 parent 9fff323 commit 2628ac4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion csp/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ def process_response(self, request, response):
headers[header].append(csp)

for header, policies in headers.items():
response[header] = '; '.join(policies)
# Multiple policies are joined by a comma and should be treated by
# the browser as though they were delivered under multiple headers.
response[header] = ', '.join(policies)
return response

def build_policy(self, request, response):
Expand Down

0 comments on commit 2628ac4

Please sign in to comment.