refactor rate limit whitelist
This commit is contained in:
parent
529342589f
commit
f045fa6d88
4 changed files with 47 additions and 31 deletions
12
core/pkg/base64/base64.go
Normal file
12
core/pkg/base64/base64.go
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
package base64
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Base64Encode
|
||||
func Base64Encode(s string) string {
|
||||
str := base64.URLEncoding.EncodeToString([]byte(s))
|
||||
return strings.Replace(str, "=", "", -1)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue