3x-ui/web/middleware
root 67c4f6a1ad fix: update rate limit tests to use CF-Connecting-IP header
The middleware was changed to trust CF-Connecting-IP instead of
X-Real-IP/X-Forwarded-For, but the tests still used the old headers.
TestRateLimitMiddleware_DifferentIPsIndependent was failing because
all requests fell back to the same httptest RemoteAddr.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-25 15:14:02 +08:00
..
domainValidator.go docs: add comments for all functions 2025-09-20 09:35:50 +02:00
middleware_test.go fix: update rate limit tests to use CF-Connecting-IP header 2026-04-25 15:14:02 +08:00
ratelimit.go fix: trust Cloudflare CF-Connecting-IP for IP extraction 2026-04-25 11:45:07 +08:00
redirect.go test: add unit tests for critical modules and fix flaky redirect middleware 2026-04-03 08:44:51 +08:00