Skip to content
Snippets Groups Projects
Commit 86ab2d48 authored by Felix Schäfer's avatar Felix Schäfer :construction_worker:
Browse files

Only add gravatar URLs to CSP where needed

parent d9e4cdd7
No related branches found
No related tags found
No related merge requests found
......@@ -55,6 +55,7 @@ def add_public_registrations_table(sender, **kwargs):
@receiver(signal=process_response, dispatch_uid="public_registragions_csp_headers")
def add_public_registrations_csp_headers(sender, response=None, **kwargs):
response['Content-Security-Policy'] = "img-src https://secure.gravatar.com"
def add_public_registrations_csp_headers(sender, request=None, response=None, **kwargs):
if "event.index" in resolve(request.path_info).url_name:
response['Content-Security-Policy'] = "img-src https://secure.gravatar.com"
return response
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment