mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-10 00:42:06 +00:00
Add CSP for GTM.
This commit is contained in:
@ -46,10 +46,10 @@ class PgMiddleware(object):
|
|||||||
sources = OrderedDict([
|
sources = OrderedDict([
|
||||||
('default', ["'self'", ]),
|
('default', ["'self'", ]),
|
||||||
('img', ['*', 'data:', ]),
|
('img', ['*', 'data:', ]),
|
||||||
('script', ["'self'", "www.google-analytics.com", "ssl.google-analytics.com", "data:"]),
|
('script', ["'unsafe-eval'", "'self'", "www.google-analytics.com", "ssl.google-analytics.com", "www.googletagmanager.com", "tagmanager.google.com", "data:"]),
|
||||||
('connect', ["'self'", "www.google-analytics.com", "ssl.google-analytics.com"]),
|
('connect', ["'self'", "www.google-analytics.com", "ssl.google-analytics.com"]),
|
||||||
('media', ["'self'", ]),
|
('media', ["'self'", ]),
|
||||||
('style', ["'self'", "fonts.googleapis.com"]),
|
('style', ["'self'", "fonts.googleapis.com", "tagmanager.google.com"]),
|
||||||
('font', ["'self'", "fonts.gstatic.com", "data:", ]),
|
('font', ["'self'", "fonts.gstatic.com", "data:", ]),
|
||||||
])
|
])
|
||||||
if hasattr(response, 'x_allow_extra_sources'):
|
if hasattr(response, 'x_allow_extra_sources'):
|
||||||
|
Reference in New Issue
Block a user