diff --git a/giteapages.go b/giteapages.go index b0eed4f..444e225 100644 --- a/giteapages.go +++ b/giteapages.go @@ -122,7 +122,7 @@ func (module GiteaPagesModule) ServeHTTP(writer http.ResponseWriter, request *ht // The URL/path looks like http(s)://.[:]//[/] // extract the organization from the hostname - organization = strings.TrimRight(request.Host, ".") + organization = strings.Split(request.Host, ".")[0] // Remove a potential "/" prefix and trailing "/" - then split up the path path = strings.TrimSuffix(strings.TrimPrefix(request.URL.Path, "/"), "/")