diff --git a/src/handler/proxyhandler.go b/src/handler/proxyhandler.go index b029fd47df4f7b00152e57cb56861fc6f143960b..17714fef0425f42f4b9326fb03d624b5d4003fdc 100644 --- a/src/handler/proxyhandler.go +++ b/src/handler/proxyhandler.go @@ -2,7 +2,6 @@ package handler import ( "fmt" - "github.com/sirupsen/logrus" "net/http" "strings" @@ -30,7 +29,6 @@ func CreateProxyHandler() (*ProxyHandler, error) { var ch chan bool func (handler *ProxyHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { - logrus.Info("===>", req.URL) if err := count(); err != nil { fmt.Println(err.Error()) w.Write([]byte("缓存计数失败!")) diff --git a/src/main.go b/src/main.go index ea1f838195ec94533248525c88ac8214e4c5196d..413158d07ac193d8f6d45cca083ad5beddf19aa0 100644 --- a/src/main.go +++ b/src/main.go @@ -27,6 +27,7 @@ func main() { counthandler, _ := handler.CreateCountHandler() http.Handle(fmt.Sprintf("%s%s", *argPrefix, "/count"), counthandler) http.Handle(*argPrefix+"/", proxyhandler) + http.Handle(os.Getenv("PROXY_PATH")+"/", proxyhandler) logrus.Info("Listen Server on port :", *argPort) http.ListenAndServe(fmt.Sprintf(":%d", *argPort), nil) }