Google Analytics and Content-Security-Policy header

前端 未结 1 920
日久生厌
日久生厌 2020-12-09 18:10

The Content-Security-Policy HTTP header is meant to block inline script and resources from untrusted servers. However, the sample Google Analytics code snippet depends on bo

相关标签:
1条回答
  • 2020-12-09 18:33

    This is mostly right:

    1. You don't need the path to the image, just the protocol + host + (implied) port

    2. Firefox differs slightly in its CSP implementation. For older versions, replace default-src with allow. There was a cutoff where Firefox supported default-src as equal to allow but most still implement with allow until it fully supports the spec (no citation included).

    0 讨论(0)
提交回复
热议问题