Files
PrivateCaptcha/pkg/common/context.go
Taras Kushnir bf0598c1a9 Make siteverify API more resilient for unauthorized access
- more aggressive caching of API keys and added cache warmup
- remove direct DB access in APIkey() middleware immediately
- decrease resources usage for test puzzles
- decrease cache collision possibility for cached solved puzzles
- cosmetic improvement in rate limiter and leaky bucket Updater logic
- move user limits check and API key backfill to a separate goroutine
2025-06-21 14:16:28 +03:00

19 lines
306 B
Go

package common
type ContextKey int
const (
TraceIDContextKey ContextKey = iota
PropertyContextKey
APIKeyContextKey
LoggedInContextKey
SessionContextKey
SitekeyContextKey
SecretContextKey
RateLimitKeyContextKey
SessionIDContextKey
TimeContextKey
// Add new fields _above_
CONTEXT_KEYS_COUNT
)