Greg Gum
Greg Gum

Reputation: 37885

How to remove the "api" from Function App URL

I created a http function on Azure. The URL is this:

https://test.azurewebsites.net/{name}

It works just fine.

But now I want to change the url to remove the API part of the string so the url is as short as possible, like this:

https://515redirect.azurewebsites.net/{name}

Is that possible? I have not been able to find a setting for this in the Portal.

Upvotes: 0

Views: 234

Answers (1)

Mikhail Shilkov
Mikhail Shilkov

Reputation: 35124

Yes, you can set this in host.json file:

{
    "http": {
        "routePrefix": ""
    }
}

The route prefix that applies to all routes. Use an empty string to remove the default prefix.

See the docs

Upvotes: 3

Related Questions