mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-22 00:00:17 +02:00
Accept owned locations in Redirect constructors (#3635)
This commit is contained in:
@@ -86,7 +86,7 @@ async fn redirect_http_to_https(ports: Ports) {
|
||||
|
||||
let redirect = move |uri: Uri| async move {
|
||||
match make_https(uri, ports.https) {
|
||||
Ok(uri) => Ok(Redirect::permanent(&uri.to_string())),
|
||||
Ok(uri) => Ok(Redirect::permanent(uri.to_string())),
|
||||
Err(error) => {
|
||||
tracing::warn!(%error, "failed to convert URI to HTTPS");
|
||||
Err(StatusCode::BAD_REQUEST)
|
||||
|
||||
Reference in New Issue
Block a user