From e3d44b8bb6f13c880274c03251b4e741a8276599 Mon Sep 17 00:00:00 2001 From: gaoshiyao Date: Thu, 24 Oct 2019 19:17:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=B7=AF=E7=94=B1=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/dockerfile | 2 +- src/handler/proxyhandler.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/build/dockerfile b/build/dockerfile index 23c30b8..b04d70c 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 17714fe..b029fd4 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("缓存计数失败!")) -- 2.26.0