mirror of
https://github.com/ntex-rs/ntex-extras.git
synced 2025-04-05 22:07:40 +03:00
rename Resource::middleware to Resource::wrap and add wrap_fn for fn middlewares
This commit is contained in:
parent
1970c99522
commit
939d2e745c
3 changed files with 149 additions and 4 deletions
|
@ -33,7 +33,7 @@ fn main() -> std::io::Result<()> {
|
|||
.service(no_params)
|
||||
.service(
|
||||
web::resource("/resource2/index.html")
|
||||
.middleware(
|
||||
.wrap(
|
||||
middleware::DefaultHeaders::new().header("X-Version-R2", "0.3"),
|
||||
)
|
||||
.default_resource(|r| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue