mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 18:00:08 +00:00
Merge pull request #562 from dchen1107/cleanup
Fixed kube-up.sh to point to the right place.
This commit is contained in:
commit
e7f4460ab8
@ -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.Handle("/logs/", http.StripPrefix("/logs/", http.FileServer(http.Dir("/var/log/"))))
|
||||||
s.mux.HandleFunc(s.prefix+"/", s.ServeREST)
|
s.mux.HandleFunc(s.prefix+"/", s.ServeREST)
|
||||||
healthz.InstallHandler(s.mux)
|
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
|
// Handle both operations and operations/* with the same handler
|
||||||
s.mux.HandleFunc(s.operationPrefix(), s.handleOperationRequest)
|
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.watchPrefix()+"/", s.handleWatch)
|
||||||
|
|
||||||
s.mux.HandleFunc("/", s.notFound)
|
|
||||||
|
|
||||||
s.mux.HandleFunc("/proxy/minion/", s.handleMinionReq)
|
s.mux.HandleFunc("/proxy/minion/", s.handleMinionReq)
|
||||||
|
|
||||||
return s
|
return s
|
||||||
@ -173,6 +172,10 @@ func (s *APIServer) watchPrefix() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (server *APIServer) handleIndex(w http.ResponseWriter, req *http.Request) {
|
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)
|
w.WriteHeader(http.StatusOK)
|
||||||
// TODO: serve this out of a file?
|
// TODO: serve this out of a file?
|
||||||
data := "<html><body>Welcome to Kubernetes</body></html>"
|
data := "<html><body>Welcome to Kubernetes</body></html>"
|
||||||
|
Loading…
Reference in New Issue
Block a user