mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 17:30:23 +08:00
fix(gateway): accept header sessions for unknown clients
This commit is contained in:
@@ -307,6 +307,18 @@ impl ClientSessionScopeAdapter for GenericSessionScopeAdapter {
|
||||
}
|
||||
|
||||
fn extract_scope(&self, request: &ClientSessionRequest<'_>) -> Option<ClientSessionScope> {
|
||||
if let Some(root_session) = header_value_str(request.headers, "session_id")
|
||||
.or_else(|| header_value_str(request.headers, "conversation_id"))
|
||||
{
|
||||
return Some(ClientSessionScope::new(
|
||||
self.family(),
|
||||
root_session,
|
||||
None,
|
||||
None,
|
||||
ClientSessionSignalSource::Header,
|
||||
));
|
||||
}
|
||||
|
||||
let body = request.body_json?;
|
||||
let root_session = value_at_paths(
|
||||
body,
|
||||
|
||||
Reference in New Issue
Block a user