feat: add replay protection plugin (#1672)

Co-authored-by: hanxiantao <601803023@qq.com>
This commit is contained in:
yunmaoQu
2025-03-10 15:11:13 +08:00
committed by GitHub
parent 5536502c15
commit f45bc9008a
11 changed files with 702 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
package util
import re "github.com/wasilibs/go-re2"
// IsValidBase64 checks if a string is a valid base64 encoded string
func IsValidBase64(s string) bool {
return re.MustCompile(`^[a-zA-Z0-9+/=-]+$`).MatchString(s)
}