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