Expand description
HTTP request handling and proxying.
This module contains the core request handling logic for the reverse proxy, including IP validation, rate limiting, URL pattern blocking, and request forwarding.
§Architecture
The request handling flow:
- Extract and validate client IP from proxy headers
- Check if IP is blocked
- Check for blocked URL patterns
- Check for blocked HTTP methods
- Apply rate limiting
- Forward request to upstream service
§Connection Pooling
The module accepts a shared reqwest::Client for HTTP connection pooling,
which should be configured by the caller with appropriate timeouts.
Functions§
- create_
error_ response - Creates a standardized error response.
- create_
unauthorized_ response - Creates a 401 Unauthorized response with WWW-Authenticate header.
- handle_
request - Handles an incoming HTTP request through the proxy pipeline.