1
0
forked from MTSR/mapserver
mapserver/server/web/config.go
NatureFreshMilk d2e4f03f82 folder rename
2019-01-23 08:46:32 +01:00

17 lines
298 B
Go

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)
}