From b8876006df80459ed52a7f0cfaee82c22412dedd Mon Sep 17 00:00:00 2001 From: Marcos Lilljedahl Date: Thu, 10 Aug 2017 12:35:25 -0300 Subject: [PATCH] Use relative path to keep browser scheme --- handlers/new_session.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handlers/new_session.go b/handlers/new_session.go index c139341..5e3b3c0 100644 --- a/handlers/new_session.go +++ b/handlers/new_session.go @@ -62,7 +62,7 @@ func NewSession(rw http.ResponseWriter, req *http.Request) { } if stack != "" { - http.Redirect(rw, req, fmt.Sprintf("%s://%s/p/%s", req.URL.Scheme, hostname, s.Id), http.StatusFound) + http.Redirect(rw, req, fmt.Sprintf("/%s/p/%s", hostname, s.Id), http.StatusFound) return } http.Redirect(rw, req, fmt.Sprintf("http://%s/p/%s", hostname, s.Id), http.StatusFound)