mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-08 04:08:08 -06:00
[feature] Make client IP logging configurable (#1799)
This commit is contained in:
parent
68e54cbaa4
commit
107237c8e8
9 changed files with 40 additions and 12 deletions
|
|
@ -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(),
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue