mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Update content-security-policy.
This commit is contained in:
parent
0fef1bfbec
commit
19216627d3
7 changed files with 16 additions and 6 deletions
|
@ -18,7 +18,7 @@ doctest = false
|
|||
base64 = "0.10.1"
|
||||
brotli = "3"
|
||||
bytes = "0.4"
|
||||
content-security-policy = {version = "0.3.0", features = ["serde"]}
|
||||
content-security-policy = {version = "0.4.0", features = ["serde"]}
|
||||
cookie_rs = {package = "cookie", version = "0.11"}
|
||||
crossbeam-channel = "0.4"
|
||||
data-url = "0.1.0"
|
||||
|
|
|
@ -203,6 +203,7 @@ pub fn main_fetch(
|
|||
|
||||
// Step 2.4.
|
||||
if should_request_be_blocked_by_csp(request) == csp::CheckResult::Blocked {
|
||||
warn!("Request blocked by CSP");
|
||||
response = Some(Response::network_error(NetworkError::Internal(
|
||||
"Blocked by Content-Security-Policy".into(),
|
||||
)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue