From a653c3eeeb44a7e09915ea64ddb87cb33fdc3a44 Mon Sep 17 00:00:00 2001 From: John Boxall Date: Sat, 3 Oct 2015 15:59:47 -0700 Subject: [PATCH] Pass `ProxyPrefix` into the error template. The default `error.html` uses `ProxyPrefix` but it isn't supplied in the context, causing it to error. --- oauthproxy.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/oauthproxy.go b/oauthproxy.go index 739d9af..5a12705 100644 --- a/oauthproxy.go +++ b/oauthproxy.go @@ -287,11 +287,13 @@ func (p *OauthProxy) ErrorPage(rw http.ResponseWriter, code int, title string, m log.Printf("ErrorPage %d %s %s", code, title, message) rw.WriteHeader(code) t := struct { - Title string - Message string + Title string + Message string + ProxyPrefix string }{ - Title: fmt.Sprintf("%d %s", code, title), - Message: message, + Title: fmt.Sprintf("%d %s", code, title), + Message: message, + ProxyPrefix: p.ProxyPrefix, } p.templates.ExecuteTemplate(rw, "error.html", t) }