Skip to content

Commit 812908d

Browse files
[Azure Functions] Update custom handler schema in host.json (#5581)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 163831a commit 812908d

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

src/schemas/json/host.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,6 +1146,22 @@
11461146
"description": "Proxy HttpTrigger request to the custom handler",
11471147
"type": "boolean",
11481148
"default": false
1149+
},
1150+
"http": {
1151+
"description": "HTTP configuration for the custom handler",
1152+
"type": "object",
1153+
"properties": {
1154+
"defaultAuthorizationLevel": {
1155+
"description": "The default authorization level for HTTP-triggered functions",
1156+
"enum": ["anonymous", "function", "admin"],
1157+
"default": "anonymous"
1158+
}
1159+
},
1160+
"additionalProperties": false
1161+
},
1162+
"port": {
1163+
"description": "The port on which the custom handler process listens",
1164+
"type": "integer"
11491165
}
11501166
},
11511167
"additionalProperties": false

src/test/host/host.v2.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,19 @@
88
"snapshotPersistenceEnabled": true
99
},
1010
"configurationProfile": "sample-profile",
11+
"customHandler": {
12+
"description": {
13+
"arguments": ["--port", "%FUNCTIONS_CUSTOMHANDLER_PORT%"],
14+
"defaultExecutablePath": "handler.exe",
15+
"workingDirectory": "app"
16+
},
17+
"enableForwardingHttpRequest": false,
18+
"enableProxyingHttpRequest": true,
19+
"http": {
20+
"defaultAuthorizationLevel": "anonymous"
21+
},
22+
"port": 3000
23+
},
1124
"extensionBundle": {
1225
"id": "Microsoft.Azure.Functions.ExtensionBundle",
1326
"version": "[4.*, 5.0.0)"

0 commit comments

Comments
 (0)