# ページヘッダーの先頭にスクリプトを追加する方法

**URL:** <https://meta.discourse.org/t/how-to-add-a-script-at-the-beginning-of-page-header/211513>\
**Category:** Product Support\
**Created:** [2021 年 12 月 8 日午後 4:41 UTC](https://meta.discourse.org/t/how-to-add-a-script-at-the-beginning-of-page-header/211513 "2021-12-08T16:41:20Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![cocococosti](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cocococosti/32/231474_2.png) [@cocococosti](https://meta.discourse.org/u/cocococosti)\
**Post date:** [2021 年 12 月 15 日午後 7:07 UTC](https://meta.discourse.org/t/how-to-add-a-script-at-the-beginning-of-page-header/211513/7 "2021-12-15T19:07:59Z")

</div>

クッキー同意スクリプトをテーマに追加した後、ブラウザのコンソールを確認したところ、コンテンツセキュリティポリシーによりCookie同意マネージャーの複数のスクリプトがブロックされていることがわかりました。それらを`content security policy script src`サイト設定に追加したところ、Cookie同意バナーが正しく表示されるようになりました。

---

_[View the full topic](https://meta.discourse.org/t/how-to-add-a-script-at-the-beginning-of-page-header/211513)._
