1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-08 09:45:57 +01:00

Use url.JoinPath in webserver.

This commit is contained in:
Juliusz Chroboczek 2023-12-09 17:40:04 +01:00
parent 1c042b55af
commit bee1c3d0c3

View file

@ -360,16 +360,7 @@ func groupBase(r *http.Request) (string, error) {
return "", nil return "", nil
} }
if conf.ProxyURL != "" { if conf.ProxyURL != "" {
u, err := url.Parse(conf.ProxyURL) return url.JoinPath(conf.ProxyURL, "/group/")
if err != nil {
return "", err
}
base := url.URL{
Scheme: u.Scheme,
Host: u.Host,
Path: path.Join(u.Path, "/group/"),
}
return base.String(), nil
} }
scheme := "https" scheme := "https"
if r.TLS == nil { if r.TLS == nil {