Allow uppercase usernames.
This commit is contained in:
commit
678762bb84
2
main.go
2
main.go
@ -117,7 +117,7 @@ func (repo *Repo) GopkgVersionRoot(version Version) string {
|
||||
}
|
||||
|
||||
var patternOld = regexp.MustCompile(`^/(?:([a-z0-9][-a-z0-9]+)/)?((?:v0|v[1-9][0-9]*)(?:\.0|\.[1-9][0-9]*){0,2})/([a-zA-Z][-a-zA-Z0-9]*)(?:\.git)?((?:/[a-zA-Z][-a-zA-Z0-9]*)*)$`)
|
||||
var patternNew = regexp.MustCompile(`^/(?:([a-z0-9][-a-z0-9]+)/)?([a-zA-Z][-a-zA-Z0-9]*)\.((?:v0|v[1-9][0-9]*)(?:\.0|\.[1-9][0-9]*){0,2})(?:\.git)?((?:/[a-zA-Z][-a-zA-Z0-9]*)*)$`)
|
||||
var patternNew = regexp.MustCompile(`^/(?:([a-zA-Z0-9][-a-zA-Z0-9]+)/)?([a-zA-Z][-a-zA-Z0-9]*)\.((?:v0|v[1-9][0-9]*)(?:\.0|\.[1-9][0-9]*){0,2})(?:\.git)?((?:/[a-zA-Z][-a-zA-Z0-9]*)*)$`)
|
||||
|
||||
func handler(resp http.ResponseWriter, req *http.Request) {
|
||||
if req.URL.Path == "/health-check" {
|
||||
|
Loading…
Reference in New Issue
Block a user