only listen on localhost

pull/123/head v2.5.28
Simon Let 6 years ago
parent 3f7818a1b4
commit 1ee488be05
  1. 2
      cmd/daemon/run-server.go

@ -64,7 +64,7 @@ func runServer(config cfg.Config, reshHistoryPath, bashHistoryPath, zshHistoryPa
mux.Handle("/inspect", &inspectHandler{sesshistDispatch: sesshistDispatch}) mux.Handle("/inspect", &inspectHandler{sesshistDispatch: sesshistDispatch})
mux.Handle("/dump", &dumpHandler{histfileBox: histfileBox}) mux.Handle("/dump", &dumpHandler{histfileBox: histfileBox})
server := &http.Server{Addr: ":" + strconv.Itoa(config.Port), Handler: mux} server := &http.Server{Addr: "localhost:" + strconv.Itoa(config.Port), Handler: mux}
go server.ListenAndServe() go server.ListenAndServe()
// signalhandler - takes over the main goroutine so when signal handler exists the whole program exits // signalhandler - takes over the main goroutine so when signal handler exists the whole program exits

Loading…
Cancel
Save