aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/http/csp/errors/cspviolation/index.md
blob: 8a4dcf55810f24d3583c7e46245f9a7fbd366812 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
title: >-
  Content Security Policy: The page’s settings blocked the loading of a
  resource: xyz
slug: Web/HTTP/CSP/Errors/CSPViolation
tags:
  - CSP
  - CSPViolation
  - Content Security Policy
  - HTTP
  - HTTPS
  - NeedsContent
  - Reference
  - Security
  - Warning
  - Web security
  - message
translation_of: Web/HTTP/CSP/Errors/CSPViolation
---
{{HTTPSidebar}}

警告 "Content Security Policy: The page's settings blocked the loading of a resource: xyz" は、`xyz` で指定されたページの CSP 設定が、文書のコンテキストにリソースが読み込まれるのを妨げた場合に発生します。

## エラーメッセージ

### Firefox

`Content Security Policy: The pages settings blocked the loading of a resource: xyz`

ここで、

- `xyz`
  - : リソースをブロックした CSP ディレクティブの名前です。これはディレクティブの名前そのものか、ポリシーのディレクティブ文字列全体で表される可能性があります。
- `uvw`
  - : 問題を解決するのに役立つ可能性がある情報を提供する文字列であり、CSP 構成に行う可能性がある特定の変更を含むこともあります。

### Chrome

- `Refused to apply inline style because it violates the following Content Security Policy Directive: "xyz". uvw.`
- `Refused to execute inline script because it violates the following Content Security Policy directive: "xyz". uvw.`
- `Refused to run the JavaScript URL because it violates the following Content Security Policy directive: "xyz". uvw.`
- `Refused to execute inline event handler because it violates the following Content Security Policy directive: "xyz". uvw.`

ここで、

- `xyz`
  - : リソースをブロックした CSP ディレクティブの名前です。これはディレクティブの名前そのものか、ポリシーのディレクティブ文字列全体で表される可能性があります。
- `uvw`
  - : 問題を解決するのに役立つ可能性がある情報を提供する文字列であり、CSP 構成に行う可能性がある特定の変更を含むこともあります。

## エラーの原因

この警告メッセージは、特定の CSP ディレクティブが存在するためにリソースが読み込まれなかったことを意味します。

## 関連情報

- [CSP のエラーと警告](/ja/docs/Web/HTTP/CSP/Errors)
- [コンテンツセキュリティポリシー](/ja/docs/Web/HTTP/CSP)
- {{HTTPHeader("Content-Security-Policy")}}
- {{HTTPHeader("Content-Security-Policy-Report-Only")}}