From fcc2e7d249626277ad9987dbb09a063072670b6d Mon Sep 17 00:00:00 2001 From: Marcos Lilljedahl Date: Thu, 10 Aug 2017 12:49:37 -0300 Subject: [PATCH] Remove unnecessary redirect and use relative paths --- handlers/new_session.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/handlers/new_session.go b/handlers/new_session.go index 5e3b3c0..d57e0c9 100644 --- a/handlers/new_session.go +++ b/handlers/new_session.go @@ -61,11 +61,7 @@ func NewSession(rw http.ResponseWriter, req *http.Request) { return } - if stack != "" { - 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) + http.Redirect(rw, req, fmt.Sprintf("/p/%s", s.Id), http.StatusFound) } }