watchdog/internal/limits/constants.go
NotAShelf c3b77696aa
internal: centralize size/length constants; better DoS protection
...also adds a bounded custom event registry for cardinality control but
I ran out of space in the commit message. Praise be to the long
descriptions...

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ic205f69804c7fb24c39fa84abdd9546b6a6a6964
2026-03-02 22:38:00 +03:00

9 lines
262 B
Go

package limits
// Size limits for request processing
const (
MaxEventSize = 4 * 1024 // 4KB max event payload
MaxPathLen = 2048 // max path length
MaxRefLen = 2048 // max referrer length
MaxWidth = 10000 // max reasonable screen width
)