Я пытаюсь изменить префикс маршрутизатора в Azure Функция SDK 3.0.5, используя следующий код в хосте. js
{
"version": "2.0",
"extensions": {
"http": {
"routePrefix": "v1"
}
}
}
Когда я запускаю это в режиме отладки и консольное приложение запускается все приложения функций все еще отображаются с / api / в пути, например
GetObject: [GET] http://localhost:7071/api/object/{id:int}
Нужно ли указывать что-то в файле functions.cs?
Вот журнал из Azure Функциональная консоль. Если я открою указанный хост-файл. json, он покажет код выше.
[11.3.2020 09:39:17] Building host: startup suppressed: 'False', configuration suppressed: 'False', startup operation id: 'HIDDEN'
[11.3.2020 09:39:17] Reading host configuration file 'C:\MyAzureFunctionApp\bin\Debug\netcoreapp3.1\host.json'
[11.3.2020 09:39:17] Host configuration file read:
[11.3.2020 09:39:17] {
[11.3.2020 09:39:17] "version": "2.0"
[11.3.2020 09:39:17] }
[11.3.2020 09:39:17] Reading functions metadata
[11.3.2020 09:39:18] 69 functions found
[11.3.2020 09:39:18] Loading startup extension 'Startup'
[11.3.2020 09:39:18] Loaded extension 'Startup' (1.0.0.0)
[11.3.2020 09:39:18] Initializing Warmup Extension.
[11.3.2020 09:39:18] Initializing Host. OperationId: 'HIDDEN'.
[11.3.2020 09:39:18] Host initialization: ConsecutiveErrors=0, StartupCount=1, OperationId=HIDDEN
[11.3.2020 09:39:18] LoggerFilterOptions
[11.3.2020 09:39:18] {
[11.3.2020 09:39:18] "MinLevel": "None",
[11.3.2020 09:39:18] "Rules": [
[11.3.2020 09:39:18] {
[11.3.2020 09:39:18] "ProviderName": null,
[11.3.2020 09:39:18] "CategoryName": null,
[11.3.2020 09:39:18] "LogLevel": null,
[11.3.2020 09:39:18] "Filter": "<AddFilter>b__0"
[11.3.2020 09:39:18] },
[11.3.2020 09:39:18] {
[11.3.2020 09:39:18] "ProviderName": "Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.SystemLoggerProvider",
[11.3.2020 09:39:18] "CategoryName": null,
[11.3.2020 09:39:18] "LogLevel": "None",
[11.3.2020 09:39:18] "Filter": null
[11.3.2020 09:39:18] },
[11.3.2020 09:39:18] {
[11.3.2020 09:39:18] "ProviderName": "Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.SystemLoggerProvider",
[11.3.2020 09:39:18] "CategoryName": null,
[11.3.2020 09:39:18] "LogLevel": null,
[11.3.2020 09:39:18] "Filter": "<AddFilter>b__0"
[11.3.2020 09:39:18] }
[11.3.2020 09:39:18] ]
[11.3.2020 09:39:18] }
[11.3.2020 09:39:18] FunctionResultAggregatorOptions
[11.3.2020 09:39:18] {
[11.3.2020 09:39:18] "BatchSize": 1000,
[11.3.2020 09:39:18] "FlushTimeout": "00:00:30",
[11.3.2020 09:39:18] "IsEnabled": true
[11.3.2020 09:39:18] }
[11.3.2020 09:39:18] SingletonOptions
[11.3.2020 09:39:18] {
[11.3.2020 09:39:18] "LockPeriod": "00:00:15",
[11.3.2020 09:39:18] "ListenerLockPeriod": "00:00:15",
[11.3.2020 09:39:18] "LockAcquisitionTimeout": "10675199.02:48:05.4775807",
[11.3.2020 09:39:18] "LockAcquisitionPollingInterval": "00:00:05",
[11.3.2020 09:39:18] "ListenerLockRecoveryPollingInterval": "00:01:00"
[11.3.2020 09:39:18] }
[11.3.2020 09:39:18] HttpOptions
[11.3.2020 09:39:18] {
[11.3.2020 09:39:18] "DynamicThrottlesEnabled": false,
[11.3.2020 09:39:18] "MaxConcurrentRequests": -1,
[11.3.2020 09:39:18] "MaxOutstandingRequests": -1,
[11.3.2020 09:39:18] "RoutePrefix": "api"
[11.3.2020 09:39:18] }
[11.3.2020 09:39:18] Starting JobHost