Skip to content

Commit

Permalink
add alternative normalize path middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
robjtede committed Jul 3, 2022
1 parent e01f97e commit 7182c24
Show file tree
Hide file tree
Showing 6 changed files with 608 additions and 0 deletions.
1 change: 1 addition & 0 deletions actix-web-lab/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## Unreleased - 2022-xx-xx
- Add alternative `NormalizePath` middleware with redirect option.


## 0.16.3 - 2022-07-03
Expand Down
1 change: 1 addition & 0 deletions actix-web-lab/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ local-channel = "0.1"
mime = "0.3"
once_cell = "1.8"
pin-project-lite = "0.2.7"
regex = "1.5.5"
serde = "1"
serde_json = "1"
serde_html_form = "0.1"
Expand Down
1 change: 1 addition & 0 deletions actix-web-lab/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
- `RedirectHttps`: middleware to redirect traffic to HTTPS if connection is insecure with optional HSTS [(docs)](https://docs.rs/actix-web-lab/0.16.3/actix_web_lab/middleware/struct.RedirectHttps.html)
- `redirect_to_www`: function middleware to redirect traffic to `www.` if not already there [(docs)](https://docs.rs/actix-web-lab/0.16.3/actix_web_lab/middleware/fn.redirect_to_www.html)
- `ErrorHandlers`: alternative error handler middleware with simpler interface [(docs)](https://docs.rs/actix-web-lab/0.16.3/actix_web_lab/middleware/struct.ErrorHandlers.html)
- `NormalizePath`: alternative path normalizing middleware with redirect option [(docs)](https://docs.rs/actix-web-lab/0.16.3/actix_web_lab/middleware/struct.NormalizePath.html)

### Extractors

Expand Down
1 change: 1 addition & 0 deletions actix-web-lab/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ mod lazy_data;
mod local_data;
mod middleware_from_fn;
mod ndjson;
mod normalize_path;
mod path;
mod query;
mod redirect;
Expand Down
1 change: 1 addition & 0 deletions actix-web-lab/src/middleware.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@

pub use crate::err_handler::ErrorHandlers;
pub use crate::middleware_from_fn::{from_fn, MiddlewareFn, Next};
pub use crate::normalize_path::NormalizePath;
pub use crate::redirect_to_https::RedirectHttps;
pub use crate::redirect_to_www::redirect_to_www;
Loading

0 comments on commit 7182c24

Please sign in to comment.