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

feat(middleware): Warn about greedy exclude patterns #3700

Merged
merged 2 commits into from
Aug 25, 2024

Conversation

provinzkraut
Copy link
Member

@provinzkraut provinzkraut commented Aug 25, 2024

Raise a warning when a middlewares exclude pattern greedily matches all paths.

Also document this footgun more prominently.

@provinzkraut provinzkraut requested review from a team as code owners August 25, 2024 09:18
@github-actions github-actions bot added area/docs This PR involves changes to the documentation area/middleware This PR involves changes to the middleware area/private-api This PR involves changes to the privatized API size: small type/feat pr/internal labels Aug 25, 2024
@provinzkraut provinzkraut force-pushed the warn-middleware-exclude-all branch from b81d113 to 5d8dbbc Compare August 25, 2024 09:20
Copy link

codecov bot commented Aug 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.28%. Comparing base (e4d1fd3) to head (5d8dbbc).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3700   +/-   ##
=======================================
  Coverage   98.28%   98.28%           
=======================================
  Files         329      329           
  Lines       14965    14973    +8     
  Branches     2382     2383    +1     
=======================================
+ Hits        14708    14716    +8     
  Misses        116      116           
  Partials      141      141           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

Copy link

Documentation preview will be available shortly at https://litestar-org.github.io/litestar-docs-preview/3700

@provinzkraut provinzkraut enabled auto-merge (squash) August 25, 2024 09:29
Copy link
Contributor

@euri10 euri10 left a comment

Choose a reason for hiding this comment

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

lgtm appart from all those newlines

@provinzkraut provinzkraut merged commit 53b18f8 into main Aug 25, 2024
26 checks passed
@provinzkraut provinzkraut deleted the warn-middleware-exclude-all branch August 25, 2024 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docs This PR involves changes to the documentation area/middleware This PR involves changes to the middleware area/private-api This PR involves changes to the privatized API pr/internal size: small type/feat
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants