fix: Fix comp with latest beta (#1018)

* fix: Fix comp with latest beta

* linux
This commit is contained in:
Fabian-Lars
2024-03-04 18:59:24 +01:00
committed by GitHub
parent 9586eabd5a
commit 8a5e05cd83
58 changed files with 2066 additions and 2129 deletions
-10
View File
@@ -102,16 +102,6 @@ impl Builder {
on_request(&request, &mut response);
}
#[cfg(target_os = "linux")]
if let Some(response_csp) =
response.headers.get("Content-Security-Policy")
{
let html = String::from_utf8_lossy(&asset.bytes);
let body =
html.replacen(tauri::utils::html::CSP_TOKEN, response_csp, 1);
asset.bytes = body.as_bytes().to_vec();
}
let mut resp = HttpResponse::from_data(asset.bytes);
for (header, value) in response.headers {
if let Ok(h) = Header::from_bytes(header.as_bytes(), value) {