Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a passthrough for scoped middleware in actix-web #1196

Merged

Conversation

nico-incubiq
Copy link
Contributor

This PR adds the ability to register middlewares at a specific Scope using a fluent API, similar to the one of actix-web's Scope struct.

Before:

utoipa_actix_web::scope(
    actix_web::web::scope("/admin")
        .wrap(Authenticated::new("/admin"))
    )
    .service(admin_dashboard)

After:

utoipa_actix_web::scope("/admin")
    .wrap(Authenticated::new("/admin"))
    .service(admin_dashboard)

@nico-incubiq nico-incubiq force-pushed the actix-web-scoped-middleware-passthrough branch from 80b199b to c56979a Compare November 8, 2024 11:30
Copy link
Owner

@juhaku juhaku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks 👍 I'll make a release of this soon.

@juhaku juhaku merged commit 478b7c9 into juhaku:master Nov 8, 2024
12 checks passed
@nico-incubiq nico-incubiq deleted the actix-web-scoped-middleware-passthrough branch November 8, 2024 13:24
@nico-incubiq
Copy link
Contributor Author

Thanks :) brilliant project btw!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants