feat(smalltrip): development middleware
This commit is contained in:
14
smalltrip/middleware/dev.go
Normal file
14
smalltrip/middleware/dev.go
Normal 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
|
||||
Reference in New Issue
Block a user