From 3182cefbe23bd5ea1c9eea68753584896dc82c3f Mon Sep 17 00:00:00 2001 From: d1slike Date: Tue, 18 Apr 2023 11:18:59 +0300 Subject: [PATCH] Fix body logging --- .version | 2 +- CHANGELOG.md | 2 ++ assembly/locator.go | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.version b/.version index 627a3f4..4d0dcda 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -4.1.1 +4.1.2 diff --git a/CHANGELOG.md b/CHANGELOG.md index a50b5d2..d520486 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +### v4.1.2 +* исправлена опция логирования тела запроса (при настройке ws могла отключаться) ### v4.1.1 * исправлена маршрутизация запросов ### v4.1.0 diff --git a/assembly/locator.go b/assembly/locator.go index 7bba240..5d78667 100644 --- a/assembly/locator.go +++ b/assembly/locator.go @@ -64,11 +64,11 @@ func (l Locator) Handler(config conf.Remote, locations []conf.Location, redisCli throttlingRepo := repository.NewThrottling(redisCli) throttlingService := service.NewThrottling(throttlingRepo, config.Throttling) - enableBodyLog := config.Logging.BodyLogEnable - mux := mux2.NewRouter() for _, location := range locations { var proxyFunc middleware.Handler + enableBodyLog := config.Logging.BodyLogEnable + switch location.Protocol { case conf.GrpcProtocol: cli := l.grpcClientByModuleName[location.TargetModule]