# コンテンツセキュリティポリシー：ページの セッティングが リソースのロードをブロックしました ("script-src")

**URL:** https://meta.discourse.org/t/content-security-policy-the-settings-of-the-page-have-blocked-the-loading-of-a-resource-script-src/262608
**Category:** Self-hosting
**Tags:** unsupported-install
**Created:** [2023 年 4 月 22 日午後 7:39 UTC](https://meta.discourse.org/t/content-security-policy-the-settings-of-the-page-have-blocked-the-loading-of-a-resource-script-src/262608 "2023-04-22T19:39:22Z")
**Posts on this page:** 8
**Page:** 2

<div class="post-metadata">

### Author: ![Justman10000](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justman10000/32/252913_2.png) [@Justman10000](https://meta.discourse.org/u/Justman10000)
#### Post date: [2023 年 4 月 25 日午後 7:28 UTC](https://meta.discourse.org/t/content-security-policy-the-settings-of-the-page-have-blocked-the-loading-of-a-resource-script-src/262608/22 "2023-04-25T19:28:31Z")

</div>

CSP？Apache2の設定は既に完了しました。app.ymlのexpose部分も同様です。

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [2023 年 4 月 30 日午後 6:30 UTC](https://meta.discourse.org/t/content-security-policy-the-settings-of-the-page-have-blocked-the-loading-of-a-resource-script-src/262608/23 "2023-04-30T18:30:19Z")

</div>

> [@Justman10000](#):
>
> `\"100:443\" # https`

なぜこれを公開しているのですか？あなたのローカルホストはポート90を使用しています。

---

<div class="post-metadata">

### Author: ![Justman10000](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justman10000/32/252913_2.png) [@Justman10000](https://meta.discourse.org/u/Justman10000)
#### Post date: [2023 年 4 月 30 日午後 7:32 UTC](https://meta.discourse.org/t/content-security-policy-the-settings-of-the-page-have-blocked-the-loading-of-a-resource-script-src/262608/24 "2023-04-30T19:32:37Z")

</div>

HTTPとHTTPSで異なるポートを選択する必要があるためですか？

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [2023 年 4 月 30 日午後 7:37 UTC](https://meta.discourse.org/t/content-security-policy-the-settings-of-the-page-have-blocked-the-loading-of-a-resource-script-src/262608/25 "2023-04-30T19:37:04Z")

</div>

リバースプロキシとバックエンド間でSSLを使用していません。リバースプロキシは、外部とバックエンドの間の壁であるため、SSLを終了しています。

---

<div class="post-metadata">

### Author: ![Justman10000](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justman10000/32/252913_2.png) [@Justman10000](https://meta.discourse.org/u/Justman10000)
#### Post date: [2023 年 5 月 2 日午後 7:21 UTC](https://meta.discourse.org/t/content-security-policy-the-settings-of-the-page-have-blocked-the-loading-of-a-resource-script-src/262608/26 "2023-05-02T19:21:03Z")

</div>

うまくいきました！しかし、今度はこのエラーが発生しています。

> Job exception: SSL\_connect returned=1 errno=0 peeraddr=\<my\_ip\>:587 state=error: certificate verify failed (unable to get local issuer certificate)

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [2023 年 5 月 2 日午後 9:02 UTC](https://meta.discourse.org/t/content-security-policy-the-settings-of-the-page-have-blocked-the-loading-of-a-resource-script-src/262608/27 "2023-05-02T21:02:39Z")

</div>

Discourse側で証明書を取得または処理しようとしていますか？それはRubyからのエラーのように聞こえます。もしそうなら、やめてください。

以下をコメントアウトする必要があります（まだそうでない場合）：

```plaintext
# - "templates/web.ssl.template.yml"
# - "templates/web.letsencrypt.ssl.template.yml"

```

---

<div class="post-metadata">

### Author: ![Justman10000](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justman10000/32/252913_2.png) [@Justman10000](https://meta.discourse.org/u/Justman10000)
#### Post date: [2023 年 5 月 3 日午後 3:27 UTC](https://meta.discourse.org/t/content-security-policy-the-settings-of-the-page-have-blocked-the-loading-of-a-resource-script-src/262608/28 "2023-05-03T15:27:09Z")

</div>

これは私のポストフィックスにあります

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [2023 年 5 月 3 日午後 3:43 UTC](https://meta.discourse.org/t/content-security-policy-the-settings-of-the-page-have-blocked-the-loading-of-a-resource-script-src/262608/29 "2023-05-03T15:43:43Z")

</div>

それなら、あなたは間違ったフォーラムにいます。しかし、postfix、ファイアウォールなどの設定を確認する必要があります。

[前のページ](https://meta.discourse.org/t/content-security-policy-the-settings-of-the-page-have-blocked-the-loading-of-a-resource-script-src/262608.md?page=1)
