diff --git a/README.md b/README.md index 07439f6a5..59238cc34 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ $ cloud-torrent --help --version, -v Version: - 0.8.3 + 0.8.4 Read more: https://github.com/jpillora/cloud-torrent diff --git a/server/server.go b/server/server.go index 58cd2dee0..ce273c43a 100644 --- a/server/server.go +++ b/server/server.go @@ -183,6 +183,16 @@ func (s *Server) reconfigure(c engine.Config) error { } func (s *Server) handle(w http.ResponseWriter, r *http.Request) { + + //handle realtime client connections + if r.URL.Path == "/realtime.js" { + realtime.JS.ServeHTTP(w, r) + return + } else if r.URL.Path == "/realtime" { + s.rt.ServeHTTP(w, r) + return + } + //basic auth if s.Auth != "" { u, p, _ := r.BasicAuth() @@ -193,15 +203,6 @@ func (s *Server) handle(w http.ResponseWriter, r *http.Request) { return } } - - //handle realtime client connections - if r.URL.Path == "/realtime.js" { - realtime.JS.ServeHTTP(w, r) - return - } else if r.URL.Path == "/realtime" { - s.rt.ServeHTTP(w, r) - return - } //search if strings.HasPrefix(r.URL.Path, "/search") { s.scraperh.ServeHTTP(w, r)