Skip to content

Commit

Permalink
Revert "feat(core): use a strict CSP on the isolation iframe (#9075)"
Browse files Browse the repository at this point in the history
This reverts commit 7cec104.
  • Loading branch information
lucasfernog authored Mar 5, 2024
1 parent fe18012 commit e56fcde
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 9 deletions.
5 changes: 0 additions & 5 deletions .changes/strict-isolation-csp.md

This file was deleted.

3 changes: 0 additions & 3 deletions core/tauri/src/protocol/isolation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ use std::sync::Arc;

use crate::{manager::webview::PROCESS_IPC_MESSAGE_FN, webview::UriSchemeProtocolHandler};

const CSP: &str = "default-src: 'none'";

pub fn get(assets: Arc<EmbeddedAssets>, aes_gcm_key: [u8; 32]) -> UriSchemeProtocolHandler {
Box::new(move |request, responder| {
let response = match request_to_path(&request).as_str() {
Expand All @@ -25,7 +23,6 @@ pub fn get(assets: Arc<EmbeddedAssets>, aes_gcm_key: [u8; 32]) -> UriSchemeProto
match template.render(asset.as_ref(), &Default::default()) {
Ok(asset) => http::Response::builder()
.header(CONTENT_TYPE, mime::TEXT_HTML.as_ref())
.header("Content-Security-Policy", CSP)
.body(asset.into_string().as_bytes().to_vec()),
Err(_) => http::Response::builder()
.status(http::StatusCode::INTERNAL_SERVER_ERROR)
Expand Down
1 change: 0 additions & 1 deletion examples/api/src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e56fcde

Please sign in to comment.