Removing the expvar handler.

I am removing the expvar handler, this is uncessary to me. I was using
the goji/httpauth package to authenticate this handler, so, I am
removing the dependency too.
This commit is contained in:
claudemiro
2015-06-13 09:18:40 -03:00
parent 228ed284d9
commit 8dbd3ccbea
7 changed files with 1 additions and 357 deletions
-1
View File
@@ -12,7 +12,6 @@ import (
// The config file
type configFile struct {
Host string // The host, eg: :8080 will start on 0.0.0.0:8080
Expvar bool
User string
Password string
Apps []*app
+1 -10
View File
@@ -8,23 +8,14 @@ import (
_ "expvar"
"net/http"
"github.com/dimiro1/ipe/vendor/github.com/goji/httpauth"
"github.com/dimiro1/ipe/vendor/github.com/gorilla/mux"
)
// NewRouter is a function that returns a new configured Router
// newRouter is a function that returns a new configured Router
// It add the necessary middlewares
func newRouter() *mux.Router {
router := mux.NewRouter().StrictSlash(true)
if conf.Expvar {
if !conf.WasProvidedUserAndPassword() {
panic("Your are exporting debug variables and looks like you forget to define an User and a Password")
}
router.Handle("/debug/vars", httpauth.SimpleBasicAuth(conf.User, conf.Password)(http.DefaultServeMux))
}
for _, route := range routes {
var handler http.Handler