Rate Limiting (ratelimit.go): - Token bucket algorithm per IP - Default: 100 requests/minute - X-Forwarded-For support - Cleanup for stale buckets - 7 tests (ratelimit_test.go) Security Headers (security.go): - X-Content-Type-Options: nosniff - X-Frame-Options: DENY - X-XSS-Protection: 1; mode=block - Content-Security-Policy: default-src 'none' - Referrer-Policy: strict-origin-when-cross-origin - Cache-Control: no-store, max-age=0 Middleware coverage: 97.3% -> 95.8% (new code added) |
||
|---|---|---|
| .. | ||
| auth.go | ||
| compress.go | ||
| cors.go | ||
| logging.go | ||
| middleware_test.go | ||
| ratelimit.go | ||
| ratelimit_test.go | ||
| security.go | ||