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

Function request_origin

packages/server/src/api/routes.rs:1361–1372  ·  view source on GitHub ↗
(headers: &HeaderMap)

Source from the content-addressed store, hash-verified

1359}
1360
1361fn request_origin(headers: &HeaderMap) -> Option<String> {
1362 headers
1363 .get(header::ORIGIN)
1364 .and_then(|value| value.to_str().ok())
1365 .map(ToOwned::to_owned)
1366 .or_else(|| {
1367 headers
1368 .get(header::HOST)
1369 .and_then(|value| value.to_str().ok())
1370 .map(|host| format!("http://{host}"))
1371 })
1372}
1373
1374async fn stream_quality(State(state): State<AppState>) -> Json<Value> {
1375 json(json_value!(stream_quality_response(&state.config)))

Callers 2

webkit_targetsFunction · 0.85
chrome_devtools_targetsFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected