Azure API Management - Changing URL for Function App causes 404

Viewed 374

I've added my function app to API Management in Azure.

My function app has an undesirable name swanky-function-app - and I want to change it.

When API management mounts it, it gives it a default URI of /swanky-function-app which is undesirable.

enter image description here

When I change the URL field to something nicer such as /some-new-path, when I test it, it 404s.

How do I customize the URL without it 404ing?

enter image description here

2 Answers

If you are setting up in APIM, you just need to est the url suffix value if you want to change the url,

enter image description here

You can add a URL rewrite policy. Select the operation, go to "Inbound processing", add policy, choose "rewrite-uri". Fill in the original route in the backend field, for frontend it should already show the URL that you chose in the Frontend URL settings (shown in window above)

I don't think that's the way it should be, but at least it works

Related