Skip to content

Commit

Permalink
🤖 cargo-fmt auto-update
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Feb 1, 2024
1 parent 0481f6d commit 03899ad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/internet_identity/src/assets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ pub fn init_assets() {
acc
});

*certified_assets = CertifiedAssets::certify_assets(assets, &security_headers(integrity_hashes));
*certified_assets =
CertifiedAssets::certify_assets(assets, &security_headers(integrity_hashes));
});
}

Expand Down
11 changes: 8 additions & 3 deletions src/internet_identity/src/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,14 @@ fn content_security_policy_header(integrity_hashes: Vec<String>) -> String {
let strict_dynamic = if integrity_hashes.is_empty() {
"'strict-dynamic'".to_string()
} else {
format!("'strict-dynamic' {}", integrity_hashes.into_iter()
.map(|x| format!("'{x}'")).collect::<Vec<String>>()
.join(" "))
format!(
"'strict-dynamic' {}",
integrity_hashes
.into_iter()
.map(|x| format!("'{x}'"))
.collect::<Vec<String>>()
.join(" ")
)
};

let csp = format!(
Expand Down

0 comments on commit 03899ad

Please sign in to comment.