feat(mw): add dev-mode rate limiting bypass

Add build tag split: real rate limiter under !dev, no-op under dev build tag.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-05-31 18:48:53 +01:00
co-authored by Sisyphus
parent d7857766fb
commit 306f942d00
2 changed files with 20 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
//go:build dev
// +build dev
package mw
import (
"net/http"
"time"
)
func RateLimit(limit int, window time.Duration) func(http.Handler) http.Handler {
return func(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
next.ServeHTTP(w, r)
})
}
}