/// Redirect asset requests to static file service.
/// Backwards compatible with old site.
Redirect asset requests to static file service.
Backwards compatible with old site.
Redirect asset requests to static file service . Backwards compatible with old site .
fn asset(file: web::Path<File>) -> Result<HttpResponse> {
    Ok(HttpResponse::Found()
       .header(header::LOCATION, format!("/static/assets/{}", file.as_ref().name()))
       .finish())
}
fn asset ( file : web :: Path < File > ) -> Result < HttpResponse > { Ok ( HttpResponse :: Found ( ) . header ( header :: LOCATION , format ! ( " " file as_ref ( ) name ( ) ) ) . finish ( ) ) }
Redirect asset requests to static file service.
Redirect asset requests to static file service .
file
web::Path<File>