mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-06-25 03:38:59 +02:00
Solved recaptcha csp bug (propably will lead to other bugs, which then need to be solved)
This commit is contained in:
parent
28c298636d
commit
cc9b634bb8
@ -91,6 +91,7 @@ class FilterModule(object):
|
|||||||
'frame-ancestors',
|
'frame-ancestors',
|
||||||
'frame-src',
|
'frame-src',
|
||||||
'script-src',
|
'script-src',
|
||||||
|
'script-src-elem',
|
||||||
'style-src',
|
'style-src',
|
||||||
'font-src',
|
'font-src',
|
||||||
'worker-src',
|
'worker-src',
|
||||||
@ -115,11 +116,11 @@ class FilterModule(object):
|
|||||||
tokens.append(f"{web_protocol}://{matomo_domain}")
|
tokens.append(f"{web_protocol}://{matomo_domain}")
|
||||||
|
|
||||||
# ReCaptcha integration: allow loading scripts from Google if feature enabled
|
# ReCaptcha integration: allow loading scripts from Google if feature enabled
|
||||||
if (
|
if self.is_feature_enabled(applications, 'recaptcha', application_id):
|
||||||
self.is_feature_enabled(applications, 'recaptcha', application_id)
|
if directive == 'script-src':
|
||||||
and directive == 'script-src'
|
|
||||||
):
|
|
||||||
tokens.append('https://www.google.com')
|
tokens.append('https://www.google.com')
|
||||||
|
if directive == 'script-src-elem':
|
||||||
|
tokens.append('https://www.gstatic.com')
|
||||||
|
|
||||||
# Enable loading via ancestors
|
# Enable loading via ancestors
|
||||||
if (
|
if (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user