mirror of
https://github.com/gomods/athens
synced 2026-02-03 11:00:32 +00:00
Set correct Content-Type headers on each endpoint rather than on the router. The router would, at times, send two Content-Type headers and other times just send the wrong one.
11 lines
186 B
Go
11 lines
186 B
Go
package actions
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
func healthHandler(w http.ResponseWriter, r *http.Request) {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(http.StatusOK)
|
|
}
|