forked from CGM_Public/pretix_original
Wallet detection: Extend CSP header for google pay
This commit is contained in:
@@ -271,6 +271,8 @@ class SecurityMiddleware(MiddlewareMixin):
|
|||||||
(url.url_name == "event.checkout" and url.kwargs['step'] == "payment")
|
(url.url_name == "event.checkout" and url.kwargs['step'] == "payment")
|
||||||
):
|
):
|
||||||
h['script-src'].append('https://pay.google.com')
|
h['script-src'].append('https://pay.google.com')
|
||||||
|
h['frame-src'].append('https://pay.google.com')
|
||||||
|
h['connect-src'].append('https://google.com/pay')
|
||||||
if settings.LOG_CSP:
|
if settings.LOG_CSP:
|
||||||
h['report-uri'] = ["/csp_report/"]
|
h['report-uri'] = ["/csp_report/"]
|
||||||
if 'Content-Security-Policy' in resp:
|
if 'Content-Security-Policy' in resp:
|
||||||
|
|||||||
Reference in New Issue
Block a user