Skip to content

Commit

Permalink
Restore the X-Call-Id for synchronous calls
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
alexellis committed Feb 10, 2021
1 parent 17584aa commit d5b98a7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gateway/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit d5b98a7

Please sign in to comment.