pub fn redirect(
from: impl Into<Cow<'static, str>>,
to: impl Into<Cow<'static, str>>
) -> Redirect
Expand description
Create a relative or absolute redirect.
See Redirect
docs for usage details.
use actix_web::{web, App};
let app = App::new()
.service(web::redirect("/api/from-path", "to-path"));