CSP: report-to

Content-Security-PolicyReport-To は HTTP のレスポンスヘッダーフィールドで、ユーザーエージェントにオリジンの報告先のエンドポイントを保存するよう指示します。

http
Content-Security-Policy: ; report-to groupname

このディレクティブは単体では効果がありませんが、他のディレクティブとの組み合わせでのみ意味を持ちます。

CSP バージョン 1
ディレクティブ種別 報告ディレクティブ
このディレクティブは <meta> 要素では対応していません。

構文

http
Content-Security-Policy: report-to <json-field-value>;

詳しい情報や例は、 Content-Security-Policy-Report-Only を参照してください。

http
Report-To: { "group": "csp-endpoint",
              "max_age": 10886400,
              "endpoints": [
                { "url": "https://example.com/csp-reports" }
              ] },
            { "group": "hpkp-endpoint",
              "max_age": 10886400,
              "endpoints": [
                { "url": "https://example.com/hpkp-reports" }
              ] }
Content-Security-Policy: ; report-to csp-endpoint
http
Report-To: { "group": "endpoint-1",
              "max_age": 10886400,
              "endpoints": [
                { "url": "https://example.com/reports" },
                { "url": "https://backup.com/reports" }
              ] }

Content-Security-Policy: ; report-to endpoint-1
http
Reporting-Endpoints: endpoint-1="https://example.com/reports"

Content-Security-Policy: ; report-to endpoint-1

仕様書

Specification
Content Security Policy Level 3
# directive-report-to

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
report-to

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
User must explicitly enable this feature.

関連情報