Commit e61224b2 authored by Alessio Caiazza's avatar Alessio Caiazza

Fix 404 for project with capital letters

When loading domains map from disk we lowercase the project name,
this patch will lowercase it also when checking incoming HTTP requests
against the configuration map.
parent cc29737d
Pipeline #32759586 passed with stage
in 4 minutes and 45 seconds
......@@ -118,7 +118,8 @@ func (d *D) getProjectWithSubpath(r *http.Request) (*project, string, string) {
// If present, these projects shadow the group domain.
split := strings.SplitN(r.URL.Path, "/", 3)
if len(split) >= 2 {
if project := d.projects[split[1]]; project != nil {
projectName := strings.ToLower(split[1])
if project := d.projects[projectName]; project != nil {
return project, split[1], strings.Join(split[2:], "/")
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment