Commit 31ed146a authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

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.
parent 6e7a5f8c
......@@ -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/",
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment