Skip to content

Commit

Permalink
Use root path for dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
akash-akya committed Jul 2, 2018
1 parent b939bc7 commit 20536b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func (server *ApiServer) Listen(host string, port string) {
r.HandleFunc("/proxies/{proxy}/toxics/{toxic}", server.ToxicDelete).Methods("DELETE")

r.HandleFunc("/version", server.Version).Methods("GET")
r.HandleFunc("/dashboard", server.ServeDashboard).Methods("GET")
r.HandleFunc("/", server.ServeDashboard).Methods("GET")

http.Handle("/", StopBrowsersMiddleware(r))

Expand Down
4 changes: 2 additions & 2 deletions api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ func TestDashboardIsAccessible(t *testing.T) {
WithServer(t, func(addr string) {
client := http.Client{}

req, _ := http.NewRequest("GET", "http://localhost:8475/dashboard", nil)
req, _ := http.NewRequest("GET", "http://localhost:8475/", nil)
resp, _ := client.Do(req)

if resp.StatusCode != 200 {
t.Fatal("Dashboard is not accessible at /dashboard")
t.Fatal("Dashboard is not accessible at /")
}
})
}
Expand Down

0 comments on commit 20536b6

Please sign in to comment.