outposts/proxy: show full error message when user is authenticated

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2021-10-02 22:00:37 +02:00
parent 3c1ac4c7ec
commit f6e8dbfb5e
2 changed files with 7 additions and 2 deletions

View File

@ -29,7 +29,7 @@ func (a *Application) configureProxy() error {
}
rp := &httputil.ReverseProxy{Director: a.proxyModifyRequest(u)}
rp.Transport = ak.NewTracingTransport(context.TODO(), a.getUpstreamTransport())
rp.ErrorHandler = NewProxyErrorHandler(templates.GetTemplates())
rp.ErrorHandler = a.newProxyErrorHandler(templates.GetTemplates())
rp.ModifyResponse = a.proxyModifyResponse
a.mux.PathPrefix("/").HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
claims, err := a.getClaims(r)