Skip to content

Commit

Permalink
Less qualification
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Mar 22, 2024
1 parent 7ed3e58 commit 7234398
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rust/agama-server/src/agama-web-server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use agama_server::{
web::{self, run_monitor},
};
use axum::{
extract::Request as AxumRequest,
http::{Request, Response},
Router,
};
Expand Down Expand Up @@ -153,7 +154,7 @@ fn redirect_error() -> Response<String> {
/// instead of the redirection
fn https_redirect() -> Router {
// see https://docs.rs/axum/latest/axum/routing/struct.Router.html#example
let redirect_service = tower::service_fn(|req: axum::extract::Request| async move {
let redirect_service = tower::service_fn(|req: AxumRequest| async move {
if let Some(host) = req.headers().get("host").and_then(|h| h.to_str().ok()) {
Ok(redirect_https(host, req.uri()))
} else {
Expand Down

0 comments on commit 7234398

Please sign in to comment.