13 lines
242 B
Go
13 lines
242 B
Go
package middleware
|
|
|
|
import "net/http"
|
|
|
|
func Headers(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)
|
|
})
|
|
}
|