This commit is contained in:
2026-04-23 20:36:37 +03:00
parent 4ecc8973bf
commit 840d7d8e3b
19 changed files with 758 additions and 0 deletions

16
internal/domain/domain.go Normal file
View File

@@ -0,0 +1,16 @@
package domain
import "strings"
func HostWithoutPort(host string) string {
host = strings.TrimSpace(strings.ToLower(host))
if i := strings.IndexByte(host, ':'); i >= 0 {
return host[:i]
}
return host
}
func IsMckoDomain(host string) bool {
host = HostWithoutPort(host)
return strings.Contains(host, ".mcko.") || strings.HasPrefix(host, "mcko.")
}