NAS: Loosen .gs. host regex
Some checks failed
Build CI / build (push) Has been cancelled

This commit is contained in:
Palapeli 2026-04-01 15:44:20 -04:00
parent 4fc6a27749
commit d5c1a80a06
No known key found for this signature in database
GPG Key ID: 1FFE8F556A474925

View File

@ -76,9 +76,9 @@ func Shutdown() {
}
}
var regexRaceHost = regexp.MustCompile(`^([a-z\-]+\.)?race\.gs\.`)
var regexSakeHost = regexp.MustCompile(`^([a-z\-]+\.)?sake\.gs\.`)
var regexGamestatsHost = regexp.MustCompile(`^([a-z\-]+\.)?gamestats2?\.gs\.`)
var regexRaceHost = regexp.MustCompile(`(\.|^)race\.(gs\.|gamespy\.com$)`)
var regexSakeHost = regexp.MustCompile(`(\.|^)sake\.(gs\.|gamespy\.com$)`)
var regexGamestatsHost = regexp.MustCompile(`(\.|^)gamestats2?\.(gs\.|gamespy\.com$)`)
var regexStage1URL = regexp.MustCompile(`^/w([0-9])$`)
func handleRequest(w http.ResponseWriter, r *http.Request) {