Versions in this module Expand all Collapse all v0 v0.0.3 Jul 16, 2026 v0.0.2 Jul 15, 2026 Changes in this version + const IdempotencyKeyHeader + const RequestIDHeader + func AuditInterceptor(logger *slog.Logger, claimsFrom ClaimsLookup) connect.Interceptor + func AuditInterceptorWithSink(logger *slog.Logger, claimsFrom ClaimsLookup, sink AuditSink) connect.Interceptor + func CORSMiddleware(allowOrigins []string, allowCredentials bool) func(http.Handler) http.Handler + func ContextWithRequestID(ctx context.Context, id string) context.Context + func HTTPAuth(authenticate func(token string) (*auth.Claims, error), ...) func(http.Handler) http.Handler + func HTTPStack(logger *slog.Logger, claimsFrom ClaimsLookup) func(http.Handler) http.Handler + func IdempotencyInterceptor(opts IdempotencyOptions) connect.Interceptor + func IdempotencyMiddleware(cfg IdempotencyConfig) func(http.Handler) http.Handler + func RateLimitInterceptor(opts RateLimitOptions, claimsFrom ClaimsLookup) connect.Interceptor + func Redact(v any, fields ...string) map[string]any + func RequestIDFromContext(ctx context.Context) string + func RequestIDMiddleware() func(http.Handler) http.Handler + func SecurityHeadersMiddleware(cfg SecurityHeadersConfig) func(http.Handler) http.Handler + type AuditEvent struct + Duration time.Duration + Email string + ErrorCode string + ErrorMessage string + PeerAddress string + Procedure string + Status string + Timestamp time.Time + TraceID string + UserID string + type AuditSink interface + Record func(ctx context.Context, e AuditEvent) + type ClaimsLookup func(ctx context.Context) (*auth.Claims, bool) + type IdempotencyConfig struct + CacheSize int + TTL time.Duration + type IdempotencyOptions struct + CacheSize int + TTL time.Duration + type RateLimitOptions struct + Burst int + Rps int + type SecurityHeadersConfig struct + ContentSecurityPolicy string + Enabled bool + HSTSMaxAge int + PermissionsPolicy string + Production bool + ReferrerPolicy string + func DefaultSecurityHeadersConfig() SecurityHeadersConfig