Server tools to backfill, tail, mirror, and verify PLC logs

main page fixup and a favicon even

+27 -10
favicon.ico

This is a binary file and will not be displayed.

+27 -10
src/mirror.rs
··· 24 format!( 25 r#"{} 26 27 - This is a PLC[1] mirror running Allegedly[2] in mirror mode. Allegedly synchronizes and proxies to a downstream PLC reference server instance[3] (why?[4]). 28 29 30 Configured upstream: ··· 34 35 Available APIs: 36 37 - - All PLC GET requests [5]. 38 - - Rejects POSTs. This is a mirror. 39 40 - try `GET /{{did}}` to resolve an identity 41 42 43 [1] https://web.plc.directory 44 - [2] https://tangled.org/@microcosm.blue/Allegedly 45 - [3] https://github.com/did-method-plc/did-method-plc 46 - [4] https://updates.microcosm.blue/3lz7nwvh4zc2u 47 - [5] https://web.plc.directory/api/redoc 48 - 49 "#, 50 logo("mirror") 51 ) 52 } 53 54 fn failed_to_reach_wrapped() -> String { ··· 204 205 let app = Route::new() 206 .at("/", get(hello)) 207 .at("/_health", get(health)) 208 .at("/:any", get(proxy).post(nope)) 209 .with(AddData::new(state)) ··· 273 ) 274 } 275 276 - let app = Route::new().at("/", get(oop_plz_be_secure)).with(Tracing); 277 Server::new(TcpListener::bind("0.0.0.0:80")) 278 .name("allegedly (mirror:80 helper)") 279 .run(app)
··· 24 format!( 25 r#"{} 26 27 + This is a PLC[1] mirror running Allegedly in mirror mode. Mirror mode wraps and 28 + synchronizes a local PLC reference server instance[2] (why?[3]). 29 30 31 Configured upstream: ··· 35 36 Available APIs: 37 38 + - GET /_health Health and version info 39 + 40 + - GET /* Proxies to wrapped server; see PLC API docs: 41 + https://web.plc.directory/api/redoc 42 + 43 + - POST /* Always rejected. This is a mirror. 44 + 45 + 46 + tip: try `GET /{{did}}` to resolve an identity 47 + 48 + 49 + Allegedly is a suit of open-source CLI tools for working with PLC logs: 50 51 + https://tangled.org/@microcosm.blue/Allegedly 52 53 54 [1] https://web.plc.directory 55 + [2] https://github.com/did-method-plc/did-method-plc 56 + [3] https://updates.microcosm.blue/3lz7nwvh4zc2u 57 "#, 58 logo("mirror") 59 ) 60 + } 61 + 62 + #[handler] 63 + fn favicon() -> impl IntoResponse { 64 + include_bytes!("../favicon.ico").with_content_type("image/x-icon") 65 } 66 67 fn failed_to_reach_wrapped() -> String { ··· 217 218 let app = Route::new() 219 .at("/", get(hello)) 220 + .at("/favicon.ico", get(favicon)) 221 .at("/_health", get(health)) 222 .at("/:any", get(proxy).post(nope)) 223 .with(AddData::new(state)) ··· 287 ) 288 } 289 290 + let app = Route::new() 291 + .at("/", get(oop_plz_be_secure)) 292 + .at("/favicon.ico", get(favicon)) 293 + .with(Tracing); 294 Server::new(TcpListener::bind("0.0.0.0:80")) 295 .name("allegedly (mirror:80 helper)") 296 .run(app)