mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Set cryptographic nonce metadata for module script fetch operations (#36776)
This fixes a bunch of CSP errors on reddit.com --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
parent
53107ec157
commit
d8c2a7eaf1
9 changed files with 4 additions and 83 deletions
|
@ -1369,7 +1369,7 @@ pub(crate) unsafe extern "C" fn host_import_module_dynamically(
|
|||
true
|
||||
}
|
||||
|
||||
#[derive(Clone, JSTraceable, MallocSizeOf)]
|
||||
#[derive(Clone, Debug, JSTraceable, MallocSizeOf)]
|
||||
/// <https://html.spec.whatwg.org/multipage/#script-fetch-options>
|
||||
pub(crate) struct ScriptFetchOptions {
|
||||
#[no_trace]
|
||||
|
@ -1763,7 +1763,8 @@ fn fetch_single_module_script(
|
|||
.mode(mode)
|
||||
.insecure_requests_policy(global.insecure_requests_policy())
|
||||
.has_trustworthy_ancestor_origin(global.has_trustworthy_ancestor_origin())
|
||||
.policy_container(global.policy_container().to_owned());
|
||||
.policy_container(global.policy_container().to_owned())
|
||||
.cryptographic_nonce_metadata(options.cryptographic_nonce.clone());
|
||||
|
||||
let context = Arc::new(Mutex::new(ModuleContext {
|
||||
owner,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue