diff --git a/build/dockerfile b/build/dockerfile index 23c30b8f2df194d716deaa3cd5db70b5e740d987..b04d70cb3dae61a13cf2df6b23eea923c733fa89 100644 --- a/build/dockerfile +++ b/build/dockerfile @@ -3,4 +3,4 @@ MAINTAINER {{ AUTHOR }} LABEL Author={{ AUTHOR }} Name={{ PROJECT }} Version={{ VERSION }} COPY ./dist/. /app EXPOSE 80 -ENTRYPOINT ["/app/proxy", "--port=80"] +ENTRYPOINT ["/app/proxy", "--port=80","--prefix=test"] diff --git a/src/handler/proxyhandler.go b/src/handler/proxyhandler.go index 17714fef0425f42f4b9326fb03d624b5d4003fdc..b029fd47df4f7b00152e57cb56861fc6f143960b 100644 --- a/src/handler/proxyhandler.go +++ b/src/handler/proxyhandler.go @@ -2,6 +2,7 @@ package handler import ( "fmt" + "github.com/sirupsen/logrus" "net/http" "strings" @@ -29,6 +30,7 @@ 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("缓存计数失败!"))