Commit e7f4460a authored by Dawn Chen's avatar Dawn Chen

Merge pull request #562 from dchen1107/cleanup

Fixed kube-up.sh to point to the right place.
parents 2a2fdb47 47ad71f9
......@@ -149,7 +149,8 @@ func New(storage map[string]RESTStorage, prefix string) *APIServer {
s.mux.Handle("/logs/", http.StripPrefix("/logs/", http.FileServer(http.Dir("/var/log/"))))
s.mux.HandleFunc(s.prefix+"/", s.ServeREST)
healthz.InstallHandler(s.mux)
s.mux.HandleFunc("/index.html", s.handleIndex)
s.mux.HandleFunc("/", s.handleIndex)
// Handle both operations and operations/* with the same handler
s.mux.HandleFunc(s.operationPrefix(), s.handleOperationRequest)
......@@ -157,8 +158,6 @@ func New(storage map[string]RESTStorage, prefix string) *APIServer {
s.mux.HandleFunc(s.watchPrefix()+"/", s.handleWatch)
s.mux.HandleFunc("/", s.notFound)
s.mux.HandleFunc("/proxy/minion/", s.handleMinionReq)
return s
......@@ -173,6 +172,10 @@ func (s *APIServer) watchPrefix() string {
}
func (server *APIServer) handleIndex(w http.ResponseWriter, req *http.Request) {
if req.URL.Path != "/" && req.URL.Path != "/index.html" {
server.notFound(w, req)
return
}
w.WriteHeader(http.StatusOK)
// TODO: serve this out of a file?
data := "<html><body>Welcome to Kubernetes</body></html>"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment