Remove unnecessary redirect and use relative paths

This commit is contained in:
Marcos Lilljedahl
2017-08-10 12:49:37 -03:00
parent b8876006df
commit fcc2e7d249

View File

@@ -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)
}
}