MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / http_router

Function http_router

crates/openshell-server/src/http.rs:181–188  ·  view source on GitHub ↗

Create the HTTP router served on the multiplexed gateway port.

(state: Arc<crate::ServerState>)

Source from the content-addressed store, hash-verified

179
180/// Create the HTTP router served on the multiplexed gateway port.
181pub fn http_router(state: Arc<crate::ServerState>) -> Router {
182 crate::ws_tunnel::router(state.clone())
183 .merge(crate::auth::router(state.clone()))
184 .layer(middleware::from_fn_with_state(
185 state,
186 sandbox_service_routing_first,
187 ))
188}
189
190/// Create the plaintext loopback-only router for browser service endpoints.
191///

Callers 1

Calls 2

mergeMethod · 0.80
routerFunction · 0.70

Tested by

no test coverage detected