feat(smalltrip): development middleware

This commit is contained in:
Guz
2025-02-24 08:03:45 -03:00
parent 4fac484f1f
commit d470007c63

14
middleware/dev.go Normal file
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