A component of ASP.NET Core for creating RESTful web services that support HTTP-based communication between clients and servers.
You probable want an hybrid app connection instead. You install a proxy service on prem rather than modifying the webapi code.
https://learn.microsoft.com/en-us/azure/app-service/app-service-hybrid-connections