You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-custom-handlers.md
+9-14Lines changed: 9 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,13 +41,13 @@ An Azure Functions app implemented as a custom handler must configure the *host.
41
41
42
42
## Deploy self-hosted MCP servers
43
43
44
-
Custom handlers also enables you to host MCP servers that you build using official MCP SDKs in Azure Functions. Custom handlers provides a simple and streamlined experience for hosting your MCP servers in Azure. For more information, see [Self-hosted remote MCP server on Azure Functions](./self-hosted-mcp-servers.md).
44
+
Custom handlers also enables you to host MCP servers that you build by using official MCP SDKs in Azure Functions. Custom handlers provides a simple and streamlined experience for hosting your MCP servers in Azure. For more information, see [Self-hosted remote MCP server on Azure Functions](./self-hosted-mcp-servers.md).
|`Outputs`| object | Holds response values as defined by the `bindings` array in *function.json*.<br /><br />For instance, if a function is configured with a queue output binding named "myQueueOutput", then `Outputs` contains a key named `myQueueOutput`, which the custom handler sets to the messages that are sent to the queue. |
197
-
|`Logs`| array | Messages appear in the Functions invocation logs.<br /><br />When running in Azure, messages appear in Application Insights. |
196
+
|`Outputs`| object | Holds response values as defined by the `bindings` array in *function.json*.<br /><br />For instance, if a function is configured with a queue output binding named "myQueueOutput", then `Outputs` contains a key named `myQueueOutput`, which the custom handler sets to the messages that it sends to the queue. |
197
+
|`Logs`| array | Messages that appear in the Functions invocation logs.<br /><br />When running in Azure, messages appear in Application Insights. |
198
198
|`ReturnValue`| string | Used to provide a response when an output is configured as `$return` in the *function.json* file. |
199
199
200
200
This table shows an example of a response payload.
@@ -406,10 +406,10 @@ By setting the `message` output equal to the order data that came in from the re
406
406
407
407
### HTTP-only function
408
408
409
-
For HTTP-triggered functions with no additional bindings or outputs, you might want your handler to work directly with the HTTP request and response instead of the custom handler [request](#request-payload) and [response](#response-payload) payloads. You can configure this behavior in *host.json* by using the `enableForwardingHttpRequest` setting.
409
+
For HTTP-triggered functions with no additional bindings or outputs, you might want your handler to work directly with the HTTP request and response instead of the custom handler [request](#request-payload) and [response](#response-payload) payloads. You can configure this behavior in *host.json* by using the `enableProxyingHttpRequest` setting, which supports response streaming.
410
410
411
411
> [!IMPORTANT]
412
-
> The primary purpose of the custom handlers feature is to enable languages and runtimes that don't currently have first-class support on Azure Functions. While you might be able to run web applications by using custom handlers, Azure Functions isn't a standard reverse proxy. Some features such as response streaming, HTTP/2, and WebSockets aren't available. Some components of the HTTP request such as certain headers and routes might be restricted. Your application might also experience excessive [cold start](event-driven-scaling.md#cold-start).
412
+
> The primary purpose of the custom handlers feature is to enable languages and runtimes that don't currently have first-class support on Azure Functions. While you might be able to run web applications by using custom handlers, Azure Functions isn't a standard reverse proxy. Some components of the HTTP request, such as certain headers and routes, might be restricted. Your application might also experience excessive [cold start](event-driven-scaling.md#cold-start).
413
413
>
414
414
> To address these circumstances, consider running your web apps on [Azure App Service](../app-service/overview.md).
415
415
@@ -444,7 +444,7 @@ In a folder named *hello*, the *function.json* file configures the HTTP-triggere
444
444
445
445
The function is configured to accept both `GET` and `POST` requests, and the result value is provided through an argument named `res`.
446
446
447
-
At the root of the app, the *host.json* file is configured to run `handler.exe` and `enableForwardingHttpRequest` is set to `true`.
447
+
At the root of the app, the *host.json* file is configured to run `handler.exe` and `enableProxyingHttpRequest` is set to `true`.
448
448
449
449
```json
450
450
{
@@ -453,18 +453,13 @@ At the root of the app, the *host.json* file is configured to run `handler.exe`
453
453
"description": {
454
454
"defaultExecutablePath": "handler.exe"
455
455
},
456
-
"enableForwardingHttpRequest": true
456
+
"enableProxyingHttpRequest": true
457
457
}
458
458
}
459
459
```
460
460
461
-
When you set `enableForwardingHttpRequest` to `true`, the behavior of HTTP-only functions differs from the default custom handlers behavior in these ways:
461
+
The following is a POST request to the Functions host. The Functions host then sends the request to the custom handler.
462
462
463
-
* The HTTP request doesn't contain the custom handlers [request](#request-payload) payload. Instead, the Functions host invokes the handler with a copy of the original HTTP request.
464
-
* The Functions host invokes the handler with the same path as the original request, including any query string parameters.
465
-
* The Functions host returns a copy of the handler's HTTP response as the response to the original request.
466
-
467
-
The following example is a POST request to the Functions host. The Functions host then sends a copy of the request to the custom handler at the same path.
0 commit comments