ccs_proxy/proxy/mod.rs
1//! Reverse-proxy app: matches every inbound HTTP request via a fallback
2//! handler, forwards it to the configured upstream, and tees a copy of the
3//! response byte stream into a background reassembler for capture.
4
5pub mod forward;
6pub mod sse_tap;
7
8use crate::AppState;
9use axum::Router;
10use axum::routing::{any, get};
11
12pub fn build_proxy_app(state: AppState) -> Router {
13 Router::new()
14 .route("/", get(|| async { "ccs-proxy: send requests here" }))
15 .fallback(any(forward::forward))
16 .with_state(state)
17}