# Default Rate Limiting configuration generated by RapidKit
rate_limiting:
  module: {{ rapidkit_vendor_module | tojson }}
  enabled: {{ rate_limiting_defaults.get('enabled', True) | tojson }}
  backend: {{ rate_limiting_defaults.get('backend', 'memory') | tojson }}
  redis:
    url: {{ rate_limiting_defaults.get('redis_url') | tojson }}
    prefix: {{ rate_limiting_defaults.get('redis_prefix', 'rate-limit') | tojson }}
  trust_forwarded_for: {{ rate_limiting_defaults.get('trust_forwarded_for', False) | tojson }}
  forwarded_for_header: {{ rate_limiting_defaults.get('forwarded_for_header', 'X-Forwarded-For') | tojson }}
  identity_header: {{ rate_limiting_defaults.get('identity_header') | tojson }}
  default_scope: {{ rate_limiting_defaults.get('default_scope', 'identity') | tojson }}
  default_rule:
    name: {{ rate_limiting_defaults.get('default_rule_name', 'default') | tojson }}
    limit: {{ rate_limiting_defaults.get('default_limit', 120) | tojson }}
    window_seconds: {{ rate_limiting_defaults.get('default_window', 60) | tojson }}
    priority: {{ rate_limiting_defaults.get('default_priority', 100) | tojson }}
    block_seconds: {{ rate_limiting_defaults.get('default_block_seconds') | tojson }}
  headers:
{% for key, value in headers_defaults | dictsort %}    {{ key }}: {{ value | tojson }}
{% endfor %}
  rules: {{ default_rules | tojson(indent=2) }}
  metadata: {{ metadata_defaults | tojson(indent=2) }}
