feat: grpc / web get real ip

This commit is contained in:
naiba
2024-11-22 00:19:36 +08:00
parent cde2ef3bd7
commit d699d0ee87
5 changed files with 78 additions and 5 deletions

View File

@@ -4,7 +4,12 @@ import (
"time"
)
const CtxKeyAuthorizedUser = "ckau"
const (
CtxKeyAuthorizedUser = "ckau"
CtxKeyRealIPStr = "ckri"
)
type CtxKeyRealIP struct{}
type Common struct {
ID uint64 `gorm:"primaryKey" json:"id,omitempty"`