Restore the X-Call-Id for synchronous calls
This appears to have been removed inadvertently whilst
adding scale from zero logic into the gateway.
Going forward, synchronous and asynchronous calls will have a
header populated.
@@ -117,7 +117,9 @@ func main() {
decorateExternalAuth := handlers.MakeExternalAuthHandler
- faasHandlers.Proxy = handlers.MakeForwardingProxyHandler(reverseProxy, functionNotifiers, functionURLResolver, functionURLTransformer, nil)
+ faasHandlers.Proxy = handlers.MakeCallIDMiddleware(
+ handlers.MakeForwardingProxyHandler(reverseProxy, functionNotifiers, functionURLResolver, functionURLTransformer, nil),
+ )
faasHandlers.ListFunctions = handlers.MakeForwardingProxyHandler(reverseProxy, forwardingNotifiers, urlResolver, nilURLTransformer, serviceAuthInjector)
faasHandlers.DeployFunction = handlers.MakeForwardingProxyHandler(reverseProxy, forwardingNotifiers, urlResolver, nilURLTransformer, serviceAuthInjector)
@@ -181,8 +183,6 @@ func main() {
prometheusQuery := metrics.NewPrometheusQuery(config.PrometheusHost, config.PrometheusPort, &http.Client{})
faasHandlers.ListFunctions = metrics.AddMetricsHandler(faasHandlers.ListFunctions, prometheusQuery)
- faasHandlers.Proxy = handlers.MakeCallIDMiddleware(faasHandlers.Proxy)
-
faasHandlers.ScaleFunction = handlers.MakeForwardingProxyHandler(reverseProxy, forwardingNotifiers, urlResolver, nilURLTransformer, serviceAuthInjector)
if credentials != nil {
