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:
parent
1c042b55af
commit
bee1c3d0c3
1 changed files with 1 additions and 10 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue