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

Blacklist for AuthenticationMiddleware #183

Closed
perdy opened this issue Mar 17, 2025 · 0 comments · Fixed by #186
Closed

Blacklist for AuthenticationMiddleware #183

perdy opened this issue Mar 17, 2025 · 0 comments · Fixed by #186
Labels
feature request Request for a new feature

Comments

@perdy
Copy link
Member

perdy commented Mar 17, 2025

Summary

Mechanism for ignoring paths in AuthenticationMiddleware

Motivation

Currently all requests are processed by AuthenticationMiddleware and it'd be a good option to provide a mechanism for ignoring requests based on regex patterns.

Proposed changes

In flama/authentication/middleware.py we can add a new parameter to AuthenticationMiddleware consisting of a list of regex patterns.

This list will be used in __call__ for filtering (continue executing) requests and only apply the middleware logic to those requests whose path is not matching any of the regex patterns.

@perdy perdy added the feature request Request for a new feature label Mar 17, 2025
@perdy perdy linked a pull request Mar 17, 2025 that will close this issue
github-actions bot pushed a commit that referenced this issue Mar 17, 2025
# [v1.10.2](v1.10.1...v1.10.2) (2025-03-17)

## 🐛 Bug Fixes
- [`554bb0d`](554bb0d)  AuthenticationMiddleware continue execution on 404 or 405
- [`9298fcc`](9298fcc)  Blacklist for AuthenticationMiddleware (#183) (Issues: [`#183`](https://github.com/vortico/flama/issues/))
- [`72174bd`](72174bd)  Blacklist for TelemetryMiddleware (#184) (Issues: [`#184`](https://github.com/vortico/flama/issues/))
- [`5e7f10a`](5e7f10a)  Custom tags for Middlewares (#185) (Issues: [`#185`](https://github.com/vortico/flama/issues/))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request for a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant