Commit e3d44b8b authored by gaoshiyao's avatar gaoshiyao

更新路由设置

parent 72d0e257
......@@ -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"]
......@@ -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("缓存计数失败!"))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment