apiVersion: v1
kind: ConfigMap
metadata:
  name: blockscout-rate-limiting
  namespace: besu-network
data:
  # Rate limiting configuration for Blockscout API
  RATE_LIMIT_ENABLED: "true"
  RATE_LIMIT_PER_MINUTE: "60"
  RATE_LIMIT_PER_HOUR: "1000"
  RATE_LIMIT_BURST: "10"
  # IP-based rate limiting
  RATE_LIMIT_BY_IP: "true"
  # API key-based rate limiting (if using API keys)
  RATE_LIMIT_BY_API_KEY: "false"
---
# Add to Blockscout deployment env:
# - name: RATE_LIMIT_ENABLED
#   valueFrom:
#     configMapKeyRef:
#       name: blockscout-rate-limiting
#       key: RATE_LIMIT_ENABLED
# - name: RATE_LIMIT_PER_MINUTE
#   valueFrom:
#     configMapKeyRef:
#       name: blockscout-rate-limiting
#       key: RATE_LIMIT_PER_MINUTE

