fix: dashboard waf page

This commit is contained in:
naiba
2024-11-30 21:33:18 +08:00
parent 08f0c25dfc
commit 166f25508c
4 changed files with 14 additions and 2 deletions

View File

@@ -3,6 +3,7 @@ package rpc
import (
"context"
"fmt"
"log"
"net/http"
"net/netip"
"time"
@@ -63,6 +64,10 @@ func getRealIp(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo,
}
}
if singleton.Conf.Debug {
log.Printf("NEZHA>> gRPC Real IP: %s", ip)
}
ctx = context.WithValue(ctx, model.CtxKeyRealIP{}, ip)
return handler(ctx, req)
}