We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9faabfd commit 8b0f1faCopy full SHA for 8b0f1fa
1 file changed
src-tauri/src/main.rs
@@ -829,8 +829,12 @@ fn main() {
829
#[cfg(not(windows))]
830
let window_origin = "phtauri://localhost";
831
832
+ // Wildcard ACAO so CORS succeeds for null-origin sandboxed iframes (the
833
+ // markdown viewer is sandboxed without allow-same-origin to contain
834
+ // untrusted markdown). Safe: phtauri://localhost isn't reachable from
835
+ // outside the Tauri webview, and these responses carry no credentials.
836
let builder = ResponseBuilder::new()
- .header("Access-Control-Allow-Origin", window_origin)
837
+ .header("Access-Control-Allow-Origin", "*")
838
.header("Origin", window_origin)
839
.header("Cache-Control", "private, max-age=7776000, immutable") // 3 month cache age expiry
840
.mimetype(&asset.mime_type);
0 commit comments