検索結果の周辺に、次の処理がないか確認します。
innerHTML
insertAdjacentHTML
document.write
eval
item.textContent = event.data;
chatBox.insertAdjacentHTML("beforeend", event.data);
受信データがHTMLとして必要ない場合は、textContentへ変更します。
CSPが設定されているか確認します。
インターネットへ接続できる管理端末で実行します。
curl -sI https://example.com/ |
grep -iE 'content-security-policy|x-content-type-options'
content-security-policy: script-src 'nonce-...' 'strict-dynamic'; object-src 'none'; base-uri 'none'
x-content-type-options: nosniff
出力なし
または、次のような広すぎる設定です。
content-security-policy: script-src * 'unsafe-inline' 'unsafe-eval'