return error_response(StatusCode::BAD_REQUEST,
"URI missing from form data".to_string());
};
- info!("IP {:?} ... Checking canary at {}", headers.get("X-Forwarded-For"), uri);
+ match headers.get("X-Forwarded-For") {
+ Some(remote_addr) => info!("IP {:?} ... Checking canary at {}", remote_addr, uri),
+ None => info!("IP unavailable ... Checking canary at {}", uri),
+ }
match ureq::get(uri.clone()).call() {
Ok(mut resp) =>
match resp.body_mut().read_to_string() {
fn decode_message_bytes(content: Vec<u8>, helper: Helper, url: String, State(state): State<AppState>) -> CheckResponse {
match String::from_utf8(content) {
Ok(content) => {
- info!("Good signature from {:?} ({:?})",
- helper.get_fingerprint(),
- helper.get_description());
+ info!("Good signature from {} ({})",
+ helper.get_fingerprint().unwrap(),
+ helper.get_description().unwrap());
(StatusCode::OK,Html(ShowCheckFormTemplate{
url: Some(url),