Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adjusts the core HTTP rate limiter so it only affects API endpoints (instead of also impacting static assets) and relaxes the default limiter settings. This continues the baseline HTTP security work from #2782 by refining the operational impact of the new middleware.
Changes:
- Refactors
build_webappto assemble API routes into a separate router and apply the governor rate limiter there before merging into the main (static) router. - Moves rate-limiter configuration into
build_webappand threadsDefGuardConfiginto webapp construction. - Increases default rate-limit settings (
per_second,burst) to be more permissive.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| crates/defguard_core/src/lib.rs | Refactors router composition; applies rate limiting only to API router and merges into main webapp; updates web server startup wiring. |
| crates/defguard_common/src/config.rs | Updates default rate limiter config values (100 req/s, burst 1000). |
| crates/defguard_core/tests/integration/api/common/mod.rs | Updates integration test helper to pass config into build_webapp. |
| crates/defguard_core/tests/integration/api/proxy_certs.rs | Updates proxy cert integration tests to pass config into build_webapp. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Continued from #2782