mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-10 06:34:20 +00:00
adding the Access-Control-Allow-Origin header to files served from filesystem in dioxus-desktop (#2818)
This commit is contained in:
parent
f10ba975ba
commit
a2180b92e9
1 changed files with 1 additions and 0 deletions
|
@ -201,6 +201,7 @@ fn serve_from_fs(path: PathBuf) -> Result<Response<Vec<u8>>> {
|
|||
|
||||
Ok(Response::builder()
|
||||
.header("Content-Type", get_mime_from_path(&asset)?)
|
||||
.header("Access-Control-Allow-Origin", "*")
|
||||
.body(std::fs::read(asset)?)?)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue