Skip to content

Commit

Permalink
Fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
lablans committed Jul 20, 2023
1 parent d3b34b4 commit 2c281cb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions shared/src/middleware.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ use hyper::Body;
use tokio::sync::{oneshot, Mutex};
use tracing::{info, instrument, span, warn, Level, error};

use crate::{beam_id::AppOrProxyId, compare_client_server_version::{compare_version, Verdict::*}};
use beam_lib::AppOrProxyId;

use crate::compare_client_server_version::{compare_version, Verdict};

const X_FORWARDED_FOR: HeaderName = HeaderName::from_static("x-forwarded-for");

pub struct LoggingInfo {
Expand Down Expand Up @@ -100,14 +101,14 @@ pub async fn log(

if let Some(their_version_header) = user_agent {
let warn = match compare_version(&their_version_header) {
BeamWithMatchingVersion | NotBeam => {
Verdict::BeamWithMatchingVersion | Verdict::NotBeam => {
// we're happy
None
},
BeamWithMismatchingVersion(their_ver) => {
Verdict::BeamWithMismatchingVersion(their_ver) => {
Some(format!(" WARNING: Client had mismatching version \"{their_ver}\""))
},
BeamWithInvalidVersion(their_ver) => {
Verdict::BeamWithInvalidVersion(their_ver) => {
Some(format!(" WARNING: Client had INVALID version \"{their_ver}\""))
},
};
Expand Down

0 comments on commit 2c281cb

Please sign in to comment.