Browse Source

Add content type to version response

master
Georg Hopp 7 years ago
parent
commit
8b5c8cd77b
Signed by: ghopp GPG Key ID: 4C5D226768784538
  1. 1
      server.go

1
server.go

@ -52,6 +52,7 @@ func (handler *ApiHandler) ServeHTTP(
dirs := strings.Split(request.URL.Path, "/") dirs := strings.Split(request.URL.Path, "/")
switch dirs[0] { switch dirs[0] {
case "version": case "version":
response.Header().Set("Content-Type", "application/json")
v, err := version.Versions.Json() v, err := version.Versions.Json()
if err != nil { if err != nil {
http.Error(response, "Unable to encode version information", 500) http.Error(response, "Unable to encode version information", 500)

Loading…
Cancel
Save