Skip to content

Conversation

@carldebilly
Copy link
Owner

  • Introduced GuardHandler for lightweight filtering of requests with configurable constraints
  • Added DI-friendly extensions to register and auto-wire GuardHandler into the server.

- Introduced `GuardHandler` for lightweight filtering of requests with configurable constraints
- Added DI-friendly extensions to register and auto-wire `GuardHandler` into the server.
@carldebilly carldebilly requested a review from Copilot September 6, 2025 21:54
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces the GuardHandler for basic request filtering with configurable constraints and adds DI-friendly extensions to simplify handler registration and auto-wiring into the server pipeline.

  • Adds GuardHandler with request validation for URL length, headers, body size, HTTP methods, and host filtering
  • Implements generic DI extensions for automatic handler registration into server pipeline
  • Creates specialized DI extensions for GuardHandler with options support

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
Yllibed.HttpServer/Handlers/GuardHandler.cs Core handler implementing request filtering logic with configurable limits
Yllibed.HttpServer/Extensions/ServiceCollectionExtensions.cs Generic DI extensions for automatic handler registration with HandlerRegistrationService
Yllibed.HttpServer/Extensions/GuardExtensions.cs Specialized DI extensions for GuardHandler registration and auto-wiring
Yllibed.HttpServer.Tests/GuardHandlerFixture.cs Unit tests for GuardHandler validation scenarios
Yllibed.HttpServer.Tests/GuardHandlerDiFixture.cs Tests for GuardHandler DI registration functionality
Yllibed.HttpServer.Tests/GenericDiHandlersFixture.cs Tests for generic handler DI registration extensions
README.md Documentation for GuardHandler usage patterns and DI integration

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@carldebilly carldebilly merged commit 99c96f3 into master Sep 6, 2025
2 checks passed
@carldebilly carldebilly deleted the dev/guard-handler branch September 6, 2025 23:11
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