@@ 253,8 253,12 @@ func (a *app) forbidden(w http.ResponseWriter, r *http.Request, msg string) {
// redirectLogin sends an unauthenticated caller to meta's login, returning them
// to the current URL afterwards.
+//
+// LoginURLFor rather than a whole Page for one field off it: building the page
+// resolves the nav, the profile link and the brand for a response that is a
+// Location header and nothing else.
func (a *app) redirectLogin(w http.ResponseWriter, r *http.Request) {
- http.Redirect(w, r, a.page(r, "").LoginURL, http.StatusSeeOther)
+ http.Redirect(w, r, a.chrome.LoginURLFor(r), http.StatusSeeOther)
}
// loadRepoForBrowse loads the repo named by the {user}/{db} URL params and