# Production Profile Configuration
# Usage: mvn spring-boot:run -Dspring-boot.run.arguments="--spring.profiles.active=prod"

spring:
  profiles:
    active: prod

# Resilience4j Rate Limiting Configuration
resilience4j:
  ratelimiter:
    configs:
      default:
        register-health-indicator: true
        limit-refresh-period: 1m
        limit-for-period: 100
        timeout-duration: 5s
    instances:
      # Auth endpoints: 5 requests per minute (brute-force protection)
      auth:
        limit-for-period: 5
        limit-refresh-period: 1m
        timeout-duration: 5s
        
      # API endpoints: 100 requests per minute
      api:
        limit-for-period: 100
        limit-refresh-period: 1m
        timeout-duration: 5s
        
      # Global fallback: 1000 requests per minute
      global:
        limit-for-period: 1000
        limit-refresh-period: 1m
        timeout-duration: 5s

  # Health check integration
  health:
    ratelimiter:
      enabled: true

# Actuator endpoints for monitoring (optional)
management:
  endpoints:
    web:
      exposure:
        include: health,metrics,prometheus,ratelimiter
  endpoint:
    health:
      show-details: always
