1
0
forked from MTSR/mapserver
mapserver/web/config.go

17 lines
298 B
Go
Raw Normal View History

2019-01-18 13:09:16 +03:00
package web
import (
"encoding/json"
"mapserver/app"
"net/http"
)
type ConfigHandler struct {
ctx *app.App
}
func (h *ConfigHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request) {
resp.Header().Add("content-type", "application/json")
json.NewEncoder(resp).Encode(h.ctx.Config)
}