Skip to content

Commit

Permalink
Fix user-agent unwrap
Browse files Browse the repository at this point in the history
  • Loading branch information
gemcoder21 committed Jan 13, 2025
1 parent 7792e86 commit edc2671
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/proxy_request_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ impl Service<Request<IncomingBody>> for ProxyRequestService {

let user_agent = headers
.get("user-agent")
.expect("invalid user-agent")
.to_str()
.map(|x| x.to_str().unwrap_or_default())
.unwrap_or_default().to_string();

log_incoming_request(&req);
Expand Down

0 comments on commit edc2671

Please sign in to comment.