feat(smalltrip): development middleware

This commit is contained in:
Guz
2025-02-24 08:03:45 -03:00
parent 0d76edaaa3
commit 9fbe24cc5c

View File

@@ -0,0 +1,14 @@
package middleware
import (
"net/http"
)
func Dev(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Cache-Control", "no-store")
next.ServeHTTP(w, r)
})
}
var _ Middleware = Dev