Add OOC check and error on new session creation

This commit is contained in:
Jonathan Leibiusky @xetorthio
2017-09-07 17:30:04 -03:00
parent ef9be2a5ac
commit 560a3ae05a
4 changed files with 79 additions and 0 deletions

View File

@@ -57,6 +57,12 @@ func Register() {
corsRouter.HandleFunc("/sessions/{sessionId}/instances/{instanceName}", DeleteInstance).Methods("DELETE")
corsRouter.HandleFunc("/sessions/{sessionId}/instances/{instanceName}/exec", Exec).Methods("POST")
r.HandleFunc("/ooc", func(rw http.ResponseWriter, r *http.Request) {
http.ServeFile(rw, r, "./www/ooc.html")
}).Methods("GET")
r.HandleFunc("/503", func(rw http.ResponseWriter, r *http.Request) {
http.ServeFile(rw, r, "./www/503.html")
}).Methods("GET")
r.HandleFunc("/p/{sessionId}", Home).Methods("GET")
r.PathPrefix("/assets").Handler(http.FileServer(http.Dir("./www")))
r.HandleFunc("/robots.txt", func(rw http.ResponseWriter, r *http.Request) {