コンテンツ セキュリティ ポリシー (CSP) 機能は、準拠しているブラウザに対するポリシー ディレクティブを提供します。これにより、クロス サイト スクリプティング (XSS) などのコンテンツ インジェクションの脆弱性を回避できます。この機能は、デフォルトで有効になっています。locked.properties にエントリを追加すると、ポリシー ディレクティブを再設定できます。
プロパティ | 値の種類 | マスター デフォルト | 他のデフォルト値 |
---|---|---|---|
enableCSP | true false |
true | n/a |
content-security-policy | directives-list | default-src 'self';script-src 'self' 'unsafe-inline' 'unsafe-eval' data:;style-src 'self' 'unsafe-inline';font-src 'self' data: | portal=child-src 'self' blob:;default-src 'self';connect-src 'self' wss:;font-src 'self' data:;img-src 'self' data: blob:;media-src 'self' blob:;object-src 'self' blob:;script-src 'self' 'unsafe-inline' 'unsafe-eval' data:;style-src 'self' 'unsafe-inline';frame-ancestors 'self' |
x-frame-options | OFF specification |
deny | portal=sameorigin |
x-content-type-options | OFF specification |
nosniff | n/a |
x-xss-protection | OFF specification |
1; mode=block | n/a |
CSP プロパティを
locked.properties ファイルに追加できます。CSP プロパティの例:
enableCSP = true content-security-policy = default-src 'self';script-src 'self' data: content-security-policy-portal = default-src 'self';frame-ancestors 'self' x-frame-options = deny x-frame-options-portal = sameorigin x-xss-protection = 1; mode=block