13 lines
252 B
Go
13 lines
252 B
Go
package middleware
|
|
|
|
import "net/http"
|
|
|
|
func Middleware(next http.Handler) http.Handler {
|
|
return http.HandlerFunc(
|
|
func(w http.ResponseWriter, r *http.Request) {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
next.ServeHTTP(w, r)
|
|
},
|
|
)
|
|
}
|