In azure functions we create the function route / name, but it Always preceded by /api
on the documentation we read:
Note that you did not in
Accepted answer does not work for v2 anymore (source: Azure-Functions-Host Gitub repo). For v2 you need to wrap http
settings inside extensions
object. Working host.json example:
{
"version": "2.0",
"extensions": {
"http": {
"routePrefix": "customPrefix"
}
}
}
You are looking for the routePrefix specified in the host.json:
{
"http": {
"routePrefix": "whatever"
}
}
You can set this for example using kudu:
https://<YOURSITE>.scm.azurewebsites.net/DebugConsole/?shell=powershell
Navigate to site -> wwwroot
and edit the host.json
Note: This does not work for v2. Please use the answer from truongx instead.