How to make Google Tag Manager and Content-Security-Policy coexist?

前端 未结 1 650
孤街浪徒
孤街浪徒 2021-02-13 23:31

The Content-Security-Policy (CSP) header aims to protect your application against malicious resource injection in your web apps. To make it simple, you provide a whitelist of al

1条回答
  •  离开以前
    2021-02-14 00:14

    I don't think there would be a way straight out of the box. What you can do is to use GTM API (https://developers.google.com/tag-manager/api/v1/reference/accounts/containers/tags/list) where you can basically iterate over all Custom HTML and Custom Image tags and collect hostnames

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