diff --git a/integrations/actix/src/lib.rs b/integrations/actix/src/lib.rs index 88ae2d2d2..2851f24e4 100644 --- a/integrations/actix/src/lib.rs +++ b/integrations/actix/src/lib.rs @@ -352,10 +352,10 @@ pub fn handle_server_fns_with_context( owner .with(|| { ScopedFuture::new(async move { - additional_context(); provide_context(Request::new(&req)); let res_options = ResponseOptions::default(); provide_context(res_options.clone()); + additional_context(); // store Accepts and Referer in case we need them for redirect (below) let accepts_html = req diff --git a/integrations/axum/src/lib.rs b/integrations/axum/src/lib.rs index c4b561b1f..8d181f1f1 100644 --- a/integrations/axum/src/lib.rs +++ b/integrations/axum/src/lib.rs @@ -381,10 +381,10 @@ async fn handle_server_fns_inner( owner .with(|| { ScopedFuture::new(async move { - additional_context(); provide_context(parts); let res_options = ResponseOptions::default(); provide_context(res_options.clone()); + additional_context(); // store Accepts and Referer in case we need them for redirect (below) let accepts_html = req @@ -2053,8 +2053,8 @@ where } else { let mut res = handle_response_inner( move || { - additional_context(); provide_context(state.clone()); + additional_context(); }, move || shell(options), req,