1
Fork 0

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:
Juliusz Chroboczek 2022-10-09 12:37:13 +02:00
parent 6e7a5f8cc6
commit 31ed146a95
1 changed files with 5 additions and 1 deletions

View File

@ -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/",
}