mirror of
https://github.com/linux-do/new-api.git
synced 2025-11-10 16:13:42 +08:00
feat: 添加令牌ip白名单功能
This commit is contained in:
@@ -128,6 +128,11 @@ func IntMax(a int, b int) int {
|
||||
}
|
||||
}
|
||||
|
||||
func IsIP(s string) bool {
|
||||
ip := net.ParseIP(s)
|
||||
return ip != nil
|
||||
}
|
||||
|
||||
func GetUUID() string {
|
||||
code := uuid.New().String()
|
||||
code = strings.Replace(code, "-", "", -1)
|
||||
|
||||
Reference in New Issue
Block a user