azure-functions-host icon indicating copy to clipboard operation
azure-functions-host copied to clipboard

Provide route params to worker when using http proxy

Open ejizba opened this issue 1 year ago • 1 comments

We'd like the host to pass the worker route param info when using http proxies. We have the url and could potentially parse it ourselves, but the user registers routes using ASP.NET route syntax since the host handles all the actual routing logic. It would be pretty complicated to parse ASP.NET route syntax (e.g. example/{name}) since it's different than typical Node.js route syntax (e.g. example/:name).

Theoretically this should be easy for the host to do for us since all the route info is in the url, not the request body itself. The host could either send the route param over rpc (we still get an rpc request per invocation) or tacked on to the request sent through the proxy as a header or something. Either way would work for us.

Discussed offline here (Internal-only thread)

ejizba avatar Jan 30 '24 02:01 ejizba

Had a chat with @kshyju and although it looks like we already provide the required data, there are enhancements that would make this simpler to consume.

Deprioritizing this since it's no longer a blocker, but we'll leave this open to track those enhancements.

fabiocav avatar Mar 13 '24 20:03 fabiocav