Strict CSP
Strict CSP
headerContent-Security-Policy:
object-src 'none';
script-src 'nonce-{random}' 'unsafe-inline' 'unsafe-eval' 'strict-dynamic' https: http:;
base-uri 'none';
report-uri <https://your-report-collector.example.com/>
各項目の意味
Strict CSP関係なく絶対いれとけという項目らしい
'none'
を指定して
そもそも <base>
を無効にし、相対pathを無効にするってこと?
後方互換性を保ちつつ、できるだけ多くのbrowserで強いCSPを適用する
CSP LevelというのはbrowserのCSP対応のレベルのコトっぽい
#??CSP Level3
nonce-{random}
他は無視
CSP Level2
Level2に対応しているbrowserでは、以下が適用される
'nonce-{random}'
unsafe-eval
他は無視
それ以外
'unsafe-inline'
'unsafe-eval'
https: http:
Flashとかのやつ
基本的に none
で良い
これ指定してないと、思わず厳しくしすぎた時に気づけなさそう

nonce-{random}
てなに