作者 tangxuhui
FROM golang:latest
FROM 192.168.0.243:5000/mmm/allied-creation-gateway:20210809
ENV APP_DIR $GOPATH/src/project
RUN mkdir -p $APP_DIR
WORKDIR $APP_DIR/
... ...
... ... @@ -4,6 +4,7 @@ import (
"github.com/beego/beego/v2/server/web"
"github.com/linmadan/egglib-go/log/logrus"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/constant"
_ "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/constant"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/cache"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log"
_ "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log"
... ...
... ... @@ -5,7 +5,7 @@ import (
"strconv"
)
const SERVICE_NAME = "gateway"
const SERVICE_NAME = "allied-creation-gateway"
var LOG_LEVEL = "debug"
... ...
... ... @@ -9,8 +9,8 @@ import (
"github.com/beego/beego/v2/server/web"
"github.com/linmadan/egglib-go/web/beego/filters"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log"
_ "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log"
_ "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego/routers"
)
... ... @@ -34,7 +34,7 @@ func init() {
web.InsertFilter("/*", web.BeforeRouter, filters.AllowCors())
web.InsertFilter("/*", web.BeforeExec, filters.CreateRequstLogFilter(log.Logger))
web.InsertFilter("/*", web.AfterExec, filters.CreateResponseLogFilter(log.Logger), web.WithReturnOnOutput(false))
web.InsertFilter("/v1/app1/*", web.BeforeExec, filters.SecureHandler(
web.InsertFilter("/v1/app11/*", web.BeforeExec, filters.SecureHandler(
filters.WithEnableCheckTimestamp(false),
filters.WithOnInvalidRequest(func(ctx *context.Context) {
headerData, _ := json.Marshal(ctx.Input.Context.Request.Header)
... ...