Browse Source

fixed the autoredirect

Mohamed Al Ashaal 6 years ago
parent
commit
5aea60d43a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      server.go

+ 2 - 2
server.go

@@ -42,9 +42,9 @@ func InitServer() error {
 	log.SetOutput(ioutil.Discard)
 
 	go (func() {
-		handler := m.HTTPHandler(nil)
+		handler := m.HTTPHandler(ServeHTTP())
 		if *AUTOREDIRECT {
-			handler = m.HTTPHandler(ServeHTTP())
+			handler = m.HTTPHandler(nil)
 		}
 		errchan <- http.ListenAndServe(*HTTP_ADDR, handler)
 	})()