From d98f8352bf52bc1c8e94ddcea88f1ff000b69aa6 Mon Sep 17 00:00:00 2001 From: ebner Date: Mon, 3 Mar 2025 12:45:15 +0100 Subject: [PATCH] changed way to detemine organization --- giteapages.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, "/"), "/")