如何使 Azure Web Api 项目 REST 端点仅对 Azure 虚拟网络可用
How to make Azure Web Api project REST endpoints only available to Azure virtual network
我有一个 .NET Web Api 项目,其中有几个 REST 端点,我只想让我创建的 Azure 虚拟网络中的资源访问这些端点。 Azure Functions 和 Azure Web Roles 等资源将仅访问这些端点。换句话说,我不希望端点公开可用。
因此,我使用我的虚拟网络配置了 Web Api 应用程序,但显然我还需要将 Web Api 应用程序添加到应用程序服务环境中(这比我拥有的成本相当高)读)。引用 Azure documentation:
VNET Integration gives your web app access to resources in your virtual network but does not grant private access to your web app from the virtual network.
我是否确实需要使用应用程序服务环境并只处理成本问题,或者是否有其他方法可以实现我想要的目标?
I do not want the endpoints publicly available.
到目前为止,Azure Web 应用仅支持使用具有应用服务环境功能的内部负载均衡器。如果你想让你的网站API只能在内部访问。需要应用服务环境。
如果您不想将您的 Web API 移动到应用服务环境并且您的 Azure 功能和 Web 角色具有固定的 IP 地址,您可以使用 ipSecurity 配置在您的 Web API。关于ipSecurity的更多信息,link以下内容供您参考。
我有一个 .NET Web Api 项目,其中有几个 REST 端点,我只想让我创建的 Azure 虚拟网络中的资源访问这些端点。 Azure Functions 和 Azure Web Roles 等资源将仅访问这些端点。换句话说,我不希望端点公开可用。
因此,我使用我的虚拟网络配置了 Web Api 应用程序,但显然我还需要将 Web Api 应用程序添加到应用程序服务环境中(这比我拥有的成本相当高)读)。引用 Azure documentation:
VNET Integration gives your web app access to resources in your virtual network but does not grant private access to your web app from the virtual network.
我是否确实需要使用应用程序服务环境并只处理成本问题,或者是否有其他方法可以实现我想要的目标?
I do not want the endpoints publicly available.
到目前为止,Azure Web 应用仅支持使用具有应用服务环境功能的内部负载均衡器。如果你想让你的网站API只能在内部访问。需要应用服务环境。
如果您不想将您的 Web API 移动到应用服务环境并且您的 Azure 功能和 Web 角色具有固定的 IP 地址,您可以使用 ipSecurity 配置在您的 Web API。关于ipSecurity的更多信息,link以下内容供您参考。