diff options
Diffstat (limited to 'internal/api/elaborate.go')
| -rw-r--r-- | internal/api/elaborate.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/api/elaborate.go b/internal/api/elaborate.go index e480e00..8a18dee 100644 --- a/internal/api/elaborate.go +++ b/internal/api/elaborate.go @@ -85,6 +85,11 @@ func (s *Server) claudeBinaryPath() string { } func (s *Server) handleElaborateTask(w http.ResponseWriter, r *http.Request) { + if s.elaborateLimiter != nil && !s.elaborateLimiter.allow(realIP(r)) { + writeJSON(w, http.StatusTooManyRequests, map[string]string{"error": "rate limit exceeded"}) + return + } + var input struct { Prompt string `json:"prompt"` ProjectDir string `json:"project_dir"` |
