mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Add warning for reporting CSP violations (#38181)
This should help debug cases like #38180 Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
This commit is contained in:
parent
b8a6600e9a
commit
e24acc5fe5
1 changed files with 2 additions and 0 deletions
|
@ -16,6 +16,7 @@ use content_security_policy::{
|
|||
use http::header::{HeaderMap, HeaderValue, ValueIter};
|
||||
use hyper_serde::Serde;
|
||||
use js::rust::describe_scripted_caller;
|
||||
use log::warn;
|
||||
|
||||
use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
|
@ -251,6 +252,7 @@ impl GlobalCspReporting for GlobalScope {
|
|||
if violations.is_empty() {
|
||||
return;
|
||||
}
|
||||
warn!("Reporting CSP violations: {:?}", violations);
|
||||
let source_position =
|
||||
source_position.unwrap_or_else(compute_scripted_caller_source_position);
|
||||
for violation in violations {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue