Skip to content

Commit

Permalink
Remove unnecessary redirect and use relative paths
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosnils committed Aug 10, 2017
1 parent b887600 commit fcc2e7d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions handlers/new_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit fcc2e7d

Please sign in to comment.