Class: Otto::MCP::RateLimitMiddleware
- Inherits:
-
Security::RateLimitMiddleware
- Object
- Security::RateLimitMiddleware
- Otto::MCP::RateLimitMiddleware
- Defined in:
- lib/otto/mcp/rate_limiting.rb
Overview
Middleware for applying rate limits to MCP protocol endpoints
Instance Method Summary collapse
-
#initialize(app, security_config = nil) ⇒ RateLimitMiddleware
constructor
A new instance of RateLimitMiddleware.
Constructor Details
#initialize(app, security_config = nil) ⇒ RateLimitMiddleware
Returns a new instance of RateLimitMiddleware.
131 132 133 134 135 136 137 138 139 140 141 |
# File 'lib/otto/mcp/rate_limiting.rb', line 131 def initialize(app, security_config = nil) @app = app @security_config = security_config @rate_limiter_available = defined?(Rack::Attack) if @rate_limiter_available configure_mcp_rate_limiting else Otto.logger.warn '[MCP] rack-attack not available - rate limiting disabled' end end |