Adam Weitzman
Adam Weitzman

Reputation: 1622

Remove "api" prefix in .NET Core Routing

All routes in .NET Core are starting with /api for example:

/api/store

Which I want to be just:

/store

In older verions of the framework I could edit this in the web.config...does anyone know where that configuration lives now?

Upvotes: 0

Views: 2209

Answers (1)

J. Doe
J. Doe

Reputation: 2747

Use attribute [Route("/store/{youraction}")] or create new MapRoute in Startup.cs (Configure section)

Upvotes: 1

Related Questions