Skip to content

Commit

Permalink
Keep scheme when redirecting
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosnils committed Aug 10, 2017
1 parent cfc03b2 commit 801bbef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion handlers/new_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func NewSession(rw http.ResponseWriter, req *http.Request) {
}

if stack != "" {
http.Redirect(rw, req, fmt.Sprintf("http://%s/p/%s", hostname, s.Id), http.StatusFound)
http.Redirect(rw, req, fmt.Sprintf("%s://%s/p/%s", req.URL.Scheme, hostname, s.Id), http.StatusFound)
return
}
http.Redirect(rw, req, fmt.Sprintf("http://%s/p/%s", hostname, s.Id), http.StatusFound)
Expand Down

0 comments on commit 801bbef

Please sign in to comment.