kumail
kumail

Reputation: 1409

My Azure function url says 'segments' instead of my function name

I have a function app hosted on azure when I get the url endpoint of the function it says https://my_function_app.azurewebsites.net/api/{*segments} instead of https://my_function_app.azurewebsites.net/api/function_name. How do I fix this?

Upvotes: 0

Views: 468

Answers (1)

Jerry Liu
Jerry Liu

Reputation: 17790

Looks like you have set route template.

If you create function on portal, click Integrate blade and delete values in Route template.

If you deploy pre-complied function to Azure, you should remove this setting in your code.

For c#, set Route=null in HttpTrigger attribute in your .cs file. For js, remove route parameter in function.json file.

Upvotes: 1

Related Questions