mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-05-10 09:50:08 +02:00
Merge main into proxy foundation
This commit is contained in:
@@ -14,6 +14,7 @@ use yaak::plugin_events::{
|
||||
use yaak::render::{render_grpc_request, render_http_request};
|
||||
use yaak::send::{SendHttpRequestWithPluginsParams, send_http_request_with_plugins};
|
||||
use yaak_crypto::manager::EncryptionManager;
|
||||
use yaak_http::cookies::get_cookie_value_from_jar;
|
||||
use yaak_models::blob_manager::BlobManager;
|
||||
use yaak_models::models::Environment;
|
||||
use yaak_models::queries::any_request::AnyRequest;
|
||||
@@ -496,10 +497,8 @@ async fn build_plugin_reply(
|
||||
}
|
||||
};
|
||||
|
||||
let value = cookie_jar.cookies.into_iter().find_map(|c| {
|
||||
let (name, value) = parse_cookie_name_value(&c.raw_cookie)?;
|
||||
if name == req.name { Some(value) } else { None }
|
||||
});
|
||||
let value =
|
||||
get_cookie_value_from_jar(cookie_jar.cookies, &req.name, req.domain.as_deref());
|
||||
Some(InternalEventPayload::GetCookieValueResponse(GetCookieValueResponse { value }))
|
||||
}
|
||||
HostRequest::WindowInfo(req) => {
|
||||
@@ -532,7 +531,6 @@ async fn render_json_value_for_cli<T: TemplateCallback>(
|
||||
render_json_value_raw(value, vars, cb, opt).await
|
||||
}
|
||||
|
||||
|
||||
fn parse_cookie_name_value(raw_cookie: &str) -> Option<(String, String)> {
|
||||
let first_part = raw_cookie.split(';').next()?.trim();
|
||||
let (name, value) = first_part.split_once('=')?;
|
||||
|
||||
Reference in New Issue
Block a user