summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorLibravatar Daenney <daenney@users.noreply.github.com>2023-05-21 17:12:47 +0200
committerLibravatar GitHub <noreply@github.com>2023-05-21 16:12:47 +0100
commit107237c8e84c541d7f24095dcce7abaf5d973a7e (patch)
treeb8721da6c56172dad5bb290516f7a0526bbc2236 /cmd
parent[bugfix] Start + stop caches properly for testrig + pruning (#1804) (diff)
downloadgotosocial-107237c8e84c541d7f24095dcce7abaf5d973a7e.tar.xz
[feature] Make client IP logging configurable (#1799)
Diffstat (limited to 'cmd')
-rw-r--r--cmd/gotosocial/action/server/server.go2
-rw-r--r--cmd/gotosocial/action/testrig/testrig.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/cmd/gotosocial/action/server/server.go b/cmd/gotosocial/action/server/server.go
index e4158ea88..76e58c2f8 100644
--- a/cmd/gotosocial/action/server/server.go
+++ b/cmd/gotosocial/action/server/server.go
@@ -162,7 +162,7 @@ var Start action.GTSAction = func(ctx context.Context) error {
middlewares = append(middlewares, []gin.HandlerFunc{
// note: hooks adding ctx fields must be ABOVE
// the logger, otherwise won't be accessible.
- middleware.Logger(),
+ middleware.Logger(config.GetLogClientIP()),
middleware.UserAgent(),
middleware.CORS(),
middleware.ExtraHeaders(),
diff --git a/cmd/gotosocial/action/testrig/testrig.go b/cmd/gotosocial/action/testrig/testrig.go
index 13e9a8f5b..5d4f20773 100644
--- a/cmd/gotosocial/action/testrig/testrig.go
+++ b/cmd/gotosocial/action/testrig/testrig.go
@@ -107,7 +107,7 @@ var Start action.GTSAction = func(ctx context.Context) error {
middlewares = append(middlewares, tracing.InstrumentGin())
}
middlewares = append(middlewares, []gin.HandlerFunc{
- middleware.Logger(),
+ middleware.Logger(config.GetLogClientIP()),
middleware.UserAgent(),
middleware.CORS(),
middleware.ExtraHeaders(),