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

Configure Feed

Select the types of activity you want to include in your feed.

sure, fine, whatever

phil 207ae897 624bf10c

+2 -8
+2 -8
src/mirror.rs
··· 6 6 use poem::{ 7 7 Body, Endpoint, EndpointExt, Error, IntoResponse, Request, Response, Result, Route, Server, 8 8 get, handler, 9 - http::{StatusCode, header::HOST, header::USER_AGENT}, 9 + http::{StatusCode, header::USER_AGENT}, 10 10 listener::{Listener, TcpListener, acme::AutoCert}, 11 11 middleware::{AddData, CatchPanic, Compression, Cors, Tracing}, 12 12 web::{Data, Json, Path}, ··· 235 235 body: Body, 236 236 ) -> Result<Response> { 237 237 if let Some(expected_domain) = &experimental.acme_domain { 238 - let Some(found_host) = req.header(HOST) else { 239 - log::debug!( 240 - "expected experimental domain but missing host header. {:?}; {:?}", 241 - req.header(HOST), 242 - req.headers() 243 - ); 244 - log::debug!("does it get put into uri??? {:?}", req.uri()); 238 + let Some(found_host) = req.uri().host() else { 245 239 return Ok(bad_create_op(&format!( 246 240 "missing `Host` header, expected {expected_domain:?} for experimental requests." 247 241 )));