現在のWebでは、セキュリティ上レスポンスヘッダで色々なものを指定します。Webデベロッパーは個別に指定しなければなりません。
そこで、セキュリティ関連のヘッダを推奨デフォルト値に設定できるようにする「Baseline ヘッダ (Opt-into Better Defaults)」が、GoogleのMike West氏によって提案されています。
まだたたき台であり、これからW3CのWebAppSec WGで議論されている予定になっています。
Baseline ヘッダ
次のようにレスポンスヘッダを指定します。
Baseline: Security=2022
これは、次のヘッダを送信するのと同様です。
Content-Security-Policy: script-src 'self'; object-src 'none'; base-uri 'none'; require-trusted-types-for 'script'; trusted-types 'none'; Cross-Origin-Embedder-Policy: credentialless Cross-Origin-Opener-Policy: same-origin Cross-Origin-Resource-Policy: same-origin Permissions-Policy: /* TBD; some reasonable baseline configuration */ X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN
各種セキュリティ関連のヘッダを指定し、XSSを防ぎ、クロスオリジンからの読み込みなどを制限します。
各ヘッダは個別に上書きすることが出来ます。