(state: AppState, client_root: PathBuf, access_token: String)
| 6069 | } |
| 6070 | |
| 6071 | fn app_router(state: AppState, client_root: PathBuf, access_token: String) -> Router { |
| 6072 | router(state).fallback( |
| 6073 | move |axum::extract::ConnectInfo(address): axum::extract::ConnectInfo<SocketAddr>, |
| 6074 | method, |
| 6075 | uri| { |
| 6076 | let access_token = address.ip().is_loopback().then(|| access_token.clone()); |
| 6077 | static_files::serve_static(client_root.clone(), method, uri, access_token) |
| 6078 | }, |
| 6079 | ) |
| 6080 | } |
| 6081 | |
| 6082 | #[cfg(unix)] |
| 6083 | struct TerminalInputMode { |
no test coverage detected