diff --git a/.gitignore b/.gitignore index 3e42fc3..c870aac 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ /target /storage -/result \ No newline at end of file +/result +flamegraph.svg +perf.data* \ No newline at end of file diff --git a/flake.nix b/flake.nix index b1d4057..a915975 100644 --- a/flake.nix +++ b/flake.nix @@ -51,7 +51,13 @@ packages."${name}-unwrapped" = project.rootCrate.build; devShell = pkgs.mkShell { - nativeBuildInputs = with pkgs; [ rustc cargo cargo-audit stdenv.cc ]; + nativeBuildInputs = with pkgs; [ + stdenv.cc + rustc + cargo + cargo-audit + cargo-flamegraph + ]; RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}"; }; } diff --git a/src/download.rs b/src/download.rs index c86d801..830e9fb 100644 --- a/src/download.rs +++ b/src/download.rs @@ -45,6 +45,7 @@ impl DownloadingFile { let mut res = HttpResponse::build(StatusCode::OK); + res.insert_header((header::CONTENT_SECURITY_POLICY, "sandbox")); res.insert_header((header::CONTENT_TYPE, mime::APPLICATION_OCTET_STREAM)); res.insert_header(( header::CONTENT_DISPOSITION, diff --git a/static/index.html b/static/index.html index 5728d64..c9b570e 100644 --- a/static/index.html +++ b/static/index.html @@ -21,9 +21,7 @@