func (a Admin) AppInfoHeader(next http.Handler) http.Handler {
	fn := func(w http.ResponseWriter, r *http.Request) {
		w.Header().Set("Author", a.Info.Author)
		w.Header().Set("App-Name", a.Info.AppName)
		w.Header().Set("App-Version", a.Info.Version)
		if host := os.Getenv("HOST"); host != "" {
			w.Header().Set("Host", host)
		}
		next.ServeHTTP(w, r)
	}
	return http.HandlerFunc(fn)
}
AppInfoHeader adds custom app-info to the response header
package handlers
import (
	"expvar"
	"net/http"
	"os"
	"time"
	"github.com/go-chi/render"
	"github.com/optimizely/agent/config"
)
var startTime = time.Now()
type JSON map[string]interface{}
type Info struct {
	Version string `json:"version,omitempty"`
	Author  string `json:"author,omitempty"`
	AppName string `json:"app_name,omitempty"`
	Uptime  string `json:"uptime"`
	Host    string `json:"host,omitempty"`
}
type Admin struct {
	Config config.AgentConfig
	Info   Info
}
func NewAdmin(conf config.AgentConfig) *Admin {
	info := Info{
		Version: conf.Version,
		Author:  conf.Author,
		AppName: conf.Name,
	}
	return &Admin{Config: conf, Info: info}
}
func (a Admin) AppInfo(w http.ResponseWriter, r *http.Request) {
	a.Info.Uptime = time.Since(startTime).String()
	render.JSON(w, r, a.Info)
}
func (a Admin) AppConfig(w http.ResponseWriter, r *http.Request) {
	render.JSON(w, r, a.Config)
}