Merge pull request #186 from vashstorm/bugfix

add auth for reload api
This commit is contained in:
fatedier
2016-12-20 05:20:54 -06:00
committed by GitHub
2 changed files with 15 additions and 2 deletions

View File

@@ -34,7 +34,8 @@ func RunDashboardServer(addr string, port int64) (err error) {
// url router
mux := http.NewServeMux()
// api, see dashboard_api.go
mux.HandleFunc("/api/reload", apiReload)
// mux.HandleFunc("/api/reload", apiReload)
mux.HandleFunc("/api/reload", use(apiReload, basicAuth))
mux.HandleFunc("/api/proxies", apiProxies)
// view, see dashboard_view.go