由于 img,Safari csp google 分析未加载
Safari csp google analytics not loaded due to img
我的 CSP 在 Safari 中有问题(尽管在 chrome 中工作正常)。我在控制台中收到以下错误。
Refused to load
https://www.google-analytics.com/collect?v=1&_v=j47&aip=1&a=1433030850&t=pageview&_s=1&dl=https%3A%2F%2Flukasoppermann.com%2F&ul=en-us&de=UTF-8&dt=vea.re%20%7C%20interface%20design%2C%20print%20design%2C%20branding%20%26%20information%20graphics%20%7C%20visionary%20design&sd=24-bit&sr=1440x900&vp=1440x746&je=1&_u=SCCAAEYgI~&jid=&cid=655577951.1480085859&tid=UA-7074034-1&z=695879907 because it does not appear in the img-src directive of the Content
Security Policy.
我真的不明白为什么 safari 要将其加载为 img。有任何想法吗?谢谢
因为跟踪调用 Google Analytics returns 1x1 透明 gif。你可以看到这个,例如在浏览器开发工具的网络选项卡中,跟踪调用显示为图像(请参阅屏幕截图中的 "type" 列)。
我的 CSP 在 Safari 中有问题(尽管在 chrome 中工作正常)。我在控制台中收到以下错误。
Refused to load https://www.google-analytics.com/collect?v=1&_v=j47&aip=1&a=1433030850&t=pageview&_s=1&dl=https%3A%2F%2Flukasoppermann.com%2F&ul=en-us&de=UTF-8&dt=vea.re%20%7C%20interface%20design%2C%20print%20design%2C%20branding%20%26%20information%20graphics%20%7C%20visionary%20design&sd=24-bit&sr=1440x900&vp=1440x746&je=1&_u=SCCAAEYgI~&jid=&cid=655577951.1480085859&tid=UA-7074034-1&z=695879907 because it does not appear in the img-src directive of the Content Security Policy.
我真的不明白为什么 safari 要将其加载为 img。有任何想法吗?谢谢
因为跟踪调用 Google Analytics returns 1x1 透明 gif。你可以看到这个,例如在浏览器开发工具的网络选项卡中,跟踪调用显示为图像(请参阅屏幕截图中的 "type" 列)。