Update content-security-policy.

This commit is contained in:
Josh Matthews 2020-03-20 15:40:55 -04:00
parent 0fef1bfbec
commit 19216627d3
7 changed files with 16 additions and 6 deletions

View file

@ -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"

View file

@ -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(),
)))