Skip to content

middleware did not take effect #3756

@Yancey2023

Description

@Yancey2023

In the following example, the auth middleware did not take effect. It will run create_library directly without identity verification.

web::resource("/library")
        .route(web::get().to(library_handlers::get_libraries))
        .route(web::post().wrap(auth.clone()).to(library_handlers::create_library)),

Your Environment

  • Rust Version: 1.89.0
  • Actix Web Version: 4.11.0

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions