middleware-manager/database
hhftechnologies 90a75b5a93 harden HTTP usage, caching, and transactional deletes
add safety across services: whitelist tables for DeleteInTransaction to prevent dynamic-SQL deletion abuse; remove a deprecated UpdateInTransaction helper. centralize HTTP client creation (HTTPClientWithTimeout/GetHTTPClient) and replace ad-hoc http.Clients with it; limit response body reads with io.LimitReader to avoid unbounded memory use; add better error logging when JSON marshal fails. Improve ConfigProxy cache handling to fetch outside locks, return stale cache on fetch errors, and only lock to swap the cache; add locking to SetCacheDuration and cap error body reads. convert ResourceWatcher isRunning to atomic.Bool for safe concurrent start/stop. Replace sync.Map memoization in id_normalizer with a bounded map protected by RWMutex (maxCacheSize), add cache flush behavior and tests/benchmarks to validate boundedness and hits. Miscellaneous test updates to match new behavior.
2026-03-01 14:22:02 +05:30
..
cleanup.go update-db 2025-08-27 16:47:52 +05:30
database_test.go updated-test-files-mtlsbugsfix 2026-01-17 13:12:44 +05:30
db.go Add support for external (Traefik) middlewares 2026-02-12 18:24:05 +05:30
migrations.sql Add support for external (Traefik) middlewares 2026-02-12 18:24:05 +05:30
sqlite_cgo.go updated-test-files-mtlsbugsfix 2026-01-17 13:12:44 +05:30
sqlite_nocgo.go updated-test-files-mtlsbugsfix 2026-01-17 13:12:44 +05:30
transaction.go harden HTTP usage, caching, and transactional deletes 2026-03-01 14:22:02 +05:30