Replies: 5 comments 3 replies
-
|
I am trying to do some decryption/ encryption of my request using middleware (IFunctionsWorkerMiddleware). The invoke method has access to an instance of FunctionContext, but that does not have any methods to access HttpRequestData or HttpResponseData. As I cannot access these properties, I am not able to do encryption/ decryption. Also for centralized exception handling, I can log to ILogger from context. But If I want to return a custom error message (response code 500, message: An error occurred while executing function), that's also not possible. I can follow the restrictions here as FunctionContext is built for all triggers and cannot have HTTP-specific properties. But is there any way to access these in pipelines so that I can do the use-cases mentioned above? |
Beta Was this translation helpful? Give feedback.
-
|
Hello @foppenm , Do we need .Net 5 version to support middleware functionality? As I'm unable to find ConfigureFunctionsWorkerDefaults method while configuring host. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for this article, exactly I was looking for :-) |
Beta Was this translation helpful? Give feedback.
-
|
Is there a way to pass a parameter into the function in this manner, like you can do with ValueProviders in ASP.NET MVC? So you could add |
Beta Was this translation helpful? Give feedback.
-
|
I am using azure function with Orchestration trigger. In that case input is not getting binded with binding context which is present in function context. Or is there any different way to access context of orchestration trigger inside middleware |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Ask any question related to the blog post here 😊
See the blog @ https://re-mark-able.net when published
Beta Was this translation helpful? Give feedback.
All reactions