mirror of
https://github.com/simongregorebner/gitea-pages.git
synced 2025-04-21 02:10:02 +02:00
changed way to detemine organization
This commit is contained in:
parent
1418f0e14e
commit
d98f8352bf
@ -122,7 +122,7 @@ func (module GiteaPagesModule) ServeHTTP(writer http.ResponseWriter, request *ht
|
||||
// The URL/path looks like http(s)://<organization>.<giteaserver>[:<port>]/<repository>/[/<filepath>]
|
||||
|
||||
// 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, "/"), "/")
|
||||
|
Loading…
x
Reference in New Issue
Block a user