feat: grpc / web get real ip

This commit is contained in:
naiba committed 2024-11-22 00:19:36 +08:00
1 parent da4cdb8fe6
commit f5776c7464
5 files changed
+78 -5

No files matched your search

+6 -1
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"`