Crate actix_rewrite

Crate actix_rewrite 

Source
Expand description

Actix-Web Middleware designed to replicate HTTPd’s mod_rewrite.

§Example

use actix_web::App;
use actix_rewrite::Engine;

let mut engine = Engine::new();
engine.add_rules(r#"
    RewriteRule /file/(.*)     /tmp/$1      [L]
    RewriteRule /redirect/(.*) /location/$1 [R=302]
    RewriteRule /blocked/(.*)  -            [F]
"#).expect("failed to process rules");

let app = App::new()
  .wrap(engine.middleware());

§Documentation

Information regarding the Rewrite expression language can be found in the mod_rewrite manual.

Documentation for this crate can be found on docs.rs.

Modules§

util
Utiliies Used for Actix ModRewrite

Structs§

Engine
Actix-Web compatible wrapper on Engine
Middleware
mod_rewrite middleware service
RewriteService
Assembled mod_rewrite service
ServerCtx
All variables and references associated with SERVER_ prefix and other server attributes.

Enums§

Error
Errors which occur when processing Reverse Proxy Requests/Responses
Rewrite
Actix-Web compatible wrapper on Rewrite