mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-19 23:24:14 +09:00
Handle CORS requests (#6289)
This commit is contained in:
committed by
techknowlogick
parent
6fb58a8cdc
commit
34d06f4c6b
6
vendor/github.com/Unknwon/com/regex.go
generated
vendored
6
vendor/github.com/Unknwon/com/regex.go
generated
vendored
@ -37,19 +37,19 @@ func init() {
|
||||
regex_url = regexp.MustCompile(regex_url_pattern)
|
||||
}
|
||||
|
||||
// validate string is an email address, if not return false
|
||||
// IsEmail validates string is an email address, if not return false
|
||||
// basically validation can match 99% cases
|
||||
func IsEmail(email string) bool {
|
||||
return regex_email.MatchString(email)
|
||||
}
|
||||
|
||||
// validate string is an email address, if not return false
|
||||
// IsEmailRFC validates string is an email address, if not return false
|
||||
// this validation omits RFC 2822
|
||||
func IsEmailRFC(email string) bool {
|
||||
return regex_strict_email.MatchString(email)
|
||||
}
|
||||
|
||||
// validate string is a url link, if not return false
|
||||
// IsUrl validates string is a url link, if not return false
|
||||
// simple validation can match 99% cases
|
||||
func IsUrl(url string) bool {
|
||||
return regex_url.MatchString(url)
|
||||
|
Reference in New Issue
Block a user