From 2628ac4df6e88751aa20a473be18423d3cfcc18f Mon Sep 17 00:00:00 2001 From: Dylan Young Date: Tue, 24 May 2022 23:39:33 -0300 Subject: [PATCH] fixup! GH-36 Update middleware for multi-policy support --- csp/middleware.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/csp/middleware.py b/csp/middleware.py index cb13333..f85219e 100644 --- a/csp/middleware.py +++ b/csp/middleware.py @@ -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):