Fix conversion of static responses in upstreams

This commit is contained in:
Joel Speed
2020-08-31 16:54:01 +01:00
parent 73f0094486
commit b40517bbe3
5 changed files with 33 additions and 16 deletions
+1
View File
@@ -56,6 +56,7 @@ func (m *multiUpstreamProxy) ServeHTTP(rw http.ResponseWriter, req *http.Request
// registerStaticResponseHandler registers a static response handler with at the given path.
func (m *multiUpstreamProxy) registerStaticResponseHandler(upstream options.Upstream) {
logger.Printf("mapping path %q => static response %d", upstream.Path, derefStaticCode(upstream.StaticCode))
m.serveMux.Handle(upstream.Path, newStaticResponseHandler(upstream.ID, upstream.StaticCode))
}