사용 사례에 맞는 경우 더 관대한 정책을 선택할 수 있습니다. 더 엄격한 정책은 예고 없이 적용될 수 있습니다.
교차 도메인 렌더링을 사용 설정합니다.
광고 iframe은 CSP에서 허용하지 않을 수 있는 외부 리소스를 로드할 수 있습니다. 동일한 도메인 iframe은 최상위 창의 CSP를 상속받으며 GPT는 광고 소재의 콘텐츠를 제어할 수 없으므로 동일한 도메인 광고 소재는 일반적으로 CSP 헤더와 제대로 작동하지 않습니다.
[null,null,["최종 업데이트: 2024-11-24(UTC)"],[[["Content Security Policy (CSP) secures your webpage by controlling resource loading and execution, and Google Publisher Tag (GPT) supports strict CSP using nonces."],["Strict CSP requires setting a `Content-Security-Policy` header with a random nonce, applied to all script tags including GPT's `gpt.js`."],["Cross-domain rendering is necessary with CSP and GPT, enabled by calling `googletag.pubads().setForceSafeFrame(true)` before ad slots load."],["To avoid breaking your site, it's recommended to test your CSP policies first using the `Content-Security-Policy-Report-Only` header for monitoring violations."]]],["Content Security Policy (CSP) secures web pages by controlling allowed resources. For Google Publisher Tag (GPT), only strict CSP using nonces is supported due to dynamic domain usage. Implementation involves: 1) Enabling CSP on the server by adding a `Content-Security-Policy` header, applying nonces to all script tags, including `gpt.js`, and defining directives like `script-src` and 2) Enabling cross-domain rendering for all ads using `googletag.pubads().setForceSafeFrame(true)`. Testing should use the `Content-Security-Policy-Report-Only` header.\n"]]