mirror of
https://github.com/jech/galene.git
synced 2024-12-22 15:25:48 +01:00
Fix computation of group URL in webserver.
We were computing the scheme incorrectly, which caused us to compute the wrong websocket URL when -insecure is set. Thanks to Fabien de Montgolfier.
This commit is contained in:
parent
6e7a5f8cc6
commit
31ed146a95
1 changed files with 5 additions and 1 deletions
|
@ -333,8 +333,12 @@ func groupHandler(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
func groupBase(r *http.Request) string {
|
||||
scheme := "https"
|
||||
if r.TLS == nil {
|
||||
scheme = "http"
|
||||
}
|
||||
base := url.URL{
|
||||
Scheme: r.URL.Scheme,
|
||||
Scheme: scheme,
|
||||
Host: r.Host,
|
||||
Path: "/group/",
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue