mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2026-08-29 02:32:06 -04:00
Merge remote-tracking branch 'origin/store' into release-prep
This commit is contained in:
commit
43e58bbb87
3 changed files with 12 additions and 5 deletions
|
|
@ -1 +1 @@
|
|||
Subproject commit 14f4e3e20b9abe41d9561d580060cf3578149640
|
||||
Subproject commit 04125e89bef517411e103cdabcfa64a1bb563423
|
||||
|
|
@ -453,7 +453,7 @@ impl ProcessManager<'_> {
|
|||
#[cfg(target_os = "windows")]
|
||||
let mut command = Command::new("cmd");
|
||||
#[cfg(target_os = "windows")]
|
||||
command.raw_arg(format!("/C \"{}\"", &launch_string));
|
||||
command.raw_arg(format!("/C \"{}\"", &launch_parameters.0));
|
||||
|
||||
info!(
|
||||
"launching (in {}): {}",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use database::borrow_db_checked;
|
||||
use http::{
|
||||
HeaderMap, HeaderValue, Request, Response, StatusCode, Uri, header::USER_AGENT,
|
||||
HeaderMap, HeaderValue, Request, Response, StatusCode, Uri, header::{CONTENT_SECURITY_POLICY, USER_AGENT, X_FRAME_OPTIONS},
|
||||
};
|
||||
use log::{error, warn};
|
||||
use tauri::UriSchemeResponder;
|
||||
|
|
@ -30,7 +30,7 @@ pub async fn handle_server_proto_wrapper(request: Request<Vec<u8>>, responder: U
|
|||
match handle_server_proto(request).await {
|
||||
Ok(r) => responder.respond(r),
|
||||
Err(e) => {
|
||||
warn!("Cache error: {e}");
|
||||
warn!("server proto error: {e}");
|
||||
responder.respond(
|
||||
Response::builder()
|
||||
.status(e)
|
||||
|
|
@ -84,12 +84,13 @@ async fn handle_server_proto(request: Request<Vec<u8>>) -> Result<Response<Vec<u
|
|||
let response = match DROP_CLIENT_ASYNC
|
||||
.request(request.method().clone(), new_uri.to_string())
|
||||
.headers(headers)
|
||||
.body(request.body().clone()) // TODO: refactor this into a move
|
||||
.send()
|
||||
.await
|
||||
{
|
||||
Ok(response) => response,
|
||||
Err(e) => {
|
||||
warn!("Could not send response. Got {e} when sending");
|
||||
warn!("Could not send response. Got {e:?} when sending");
|
||||
return Err(e.status().unwrap_or(StatusCode::BAD_REQUEST));
|
||||
}
|
||||
};
|
||||
|
|
@ -102,6 +103,12 @@ async fn handle_server_proto(request: Request<Vec<u8>>) -> Result<Response<Vec<u
|
|||
{
|
||||
let client_response_headers = client_http_response.headers_mut().unwrap();
|
||||
for (header, header_value) in response.headers() {
|
||||
if header == CONTENT_SECURITY_POLICY {
|
||||
continue;
|
||||
}
|
||||
if header == X_FRAME_OPTIONS {
|
||||
continue;
|
||||
}
|
||||
client_response_headers.insert(header, header_value.clone());
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue