Pass `ProxyPrefix` into the error template.
The default `error.html` uses `ProxyPrefix` but it isn't supplied in the context, causing it to error.
This commit is contained in:
		
							parent
							
								
									3ed828ef45
								
							
						
					
					
						commit
						a653c3eeeb
					
				|  | @ -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) | 	log.Printf("ErrorPage %d %s %s", code, title, message) | ||||||
| 	rw.WriteHeader(code) | 	rw.WriteHeader(code) | ||||||
| 	t := struct { | 	t := struct { | ||||||
| 		Title   string | 		Title       string | ||||||
| 		Message string | 		Message     string | ||||||
|  | 		ProxyPrefix string | ||||||
| 	}{ | 	}{ | ||||||
| 		Title:   fmt.Sprintf("%d %s", code, title), | 		Title:       fmt.Sprintf("%d %s", code, title), | ||||||
| 		Message: message, | 		Message:     message, | ||||||
|  | 		ProxyPrefix: p.ProxyPrefix, | ||||||
| 	} | 	} | ||||||
| 	p.templates.ExecuteTemplate(rw, "error.html", t) | 	p.templates.ExecuteTemplate(rw, "error.html", t) | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue