MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / query_token_from_query

Function query_token_from_query

packages/server/src/auth.rs:203–209  ·  view source on GitHub ↗
(query: Option<&str>)

Source from the content-addressed store, hash-verified

201}
202
203fn query_token_from_query(query: Option<&str>) -> Option<&str> {
204 let query = query?;
205 query.split('&').find_map(|part| {
206 let (name, value) = part.split_once('=')?;
207 (name == ACCESS_TOKEN_QUERY).then_some(value)
208 })
209}
210
211fn origin_allowed_or_absent(config: &Config, headers: &HeaderMap) -> bool {
212 headers

Callers 1

api_request_authorizedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected