- RateLimitFilter: fixed-window counters in Redis (Lua INCR+PEXPIRE) per client IP for login, registration, refresh, check-login, post creation, uploads, chat start and public ad endpoints; 429 with Retry-After; fails open when Redis is down. Rules live in rate-limit.* in application.yaml. - Login is blocked for an account after 10 failed attempts in 15 minutes, independent of the client IP. - Registration requires a password of at least 8 characters. - server.forward-headers-strategy=native so the client IP survives a reverse proxy; graceful shutdown. - /actuator/health with liveness/readiness probes is public (no details). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
14 lines
224 B
Java
14 lines
224 B
Java
package com.krylov.refound.enums;
|
|
|
|
public enum ErrorCode {
|
|
VALIDATION_ERROR,
|
|
NOT_FOUND,
|
|
INTERNAL_ERROR,
|
|
BAD_REQUEST,
|
|
UNAUTHORIZED,
|
|
FORBIDDEN,
|
|
CONTENT_BLOCKED,
|
|
INVALID_STATUS_TRANSITION,
|
|
TOO_MANY_REQUESTS
|
|
}
|