2024-07-01 10:56:14: merge [master:f9b2632335c35844013af97443dacebb9fc385c5];

This commit is contained in:
txix committed 2024-07-01 10:56:14 +03:00
1 parent cd985ff5a3
commit 6db18c1495
19 files changed
+107 -82

No files matched your search

+6 -6
View File
@@ -97,14 +97,14 @@ func Logger(
authData, _ := ctx.GetAuthData()
fields := []log.Field{
log.String("http_method", r.Method),
log.String("remote_addr", r.RemoteAddr),
log.String("x_forwarded_for", r.Header.Get("X-Forwarded-For")),
log.Int("status_code", scSrc.StatusCode()),
log.String("httpMethod", r.Method),
log.String("remoteAddr", r.RemoteAddr),
log.String("xForwardedFor", r.Header.Get("X-Forwarded-For")),
log.Int("statusCode", scSrc.StatusCode()),
log.String("path", originalPath),
log.String("endpoint", ctx.Endpoint()),
log.Int("application_id", authData.ApplicationId),
log.Int("admin_id", ctx.AdminId()),
log.Int("applicationId", authData.ApplicationId),
log.Int("adminId", ctx.AdminId()),
}
if logBodyFromCurrenRequest {
+1
View File
@@ -16,6 +16,7 @@ func (f HandlerFunc) Handle(ctx *request.Context) error {
type Middleware func(next Handler) Handler
// nolint:ireturn
func Chain(root Handler, middlewares ...Middleware) Handler {
for i := len(middlewares) - 1; i >= 0; i-- {
root = middlewares[i](root)