[英]How to keep web app to api app calls within ILB ASE
I have web and api app deployed within ILB ASE fronted by Application Gateway.Would I be able to make the calls from my web app to api app without exposing api app externally? 我在面向Application Gateway的ILB ASE中部署了web和api应用程序。我是否能够从我的Web应用程序调用api应用程序,而不会在外部暴露api应用程序? If so, how can I do that?
如果是这样,我该怎么做?
I configured application gateway to point to the front end web app. 我将应用程序网关配置为指向前端Web应用程序。 I created internet routable domain and added to custom domain in my web app.
我创建了互联网可路由域,并在我的网络应用中添加到自定义域。 In my DNS, I pointed the custom domain to hostname of the application gateway and I am able to logon to my web app.
在我的DNS中,我将自定义域指向应用程序网关的主机名,并且我能够登录到我的Web应用程序。 But, I see my web app written in AngualarJS is making XMLHttpRequest to backend API URL and as the backend API URL can not be resolved from my desktop, it is failing.
但是,我看到我在AngualarJS中编写的Web应用程序正在使用XMLHttpRequest来后端API URL,并且由于无法从我的桌面解析后端API URL,因此它失败了。
My requirement is not to expose API app outside of the ILB ASE VNET. 我的要求是不要在ILB ASE VNET之外公开API应用程序。 Any suggestions?
有什么建议么?
If you want the web app and API could communicate with each other in an ILB ASE, you need to deploy an internal DNS service. 如果您希望Web应用程序和API可以在ILB ASE中相互通信,则需要部署内部DNS服务。 For example, you could deploy a custom DNS server on Azure VM in the same Azure VNet.
例如,您可以在同一Azure VNet中的Azure VM上部署自定义DNS服务器。 You can specify DNS server IP addresses in the VNet settings .
您可以在VNet设置中指定DNS服务器IP地址 。 The VNet is your ASE subnet located.
VNet是您的ASE子网。
Please note that restart ASE after DNS IP address is added to VNet if you add the DNS after you deploy ASE. 请注意,如果在部署ASE后添加DNS,则在DNS IP地址添加到VNet后重新启动ASE。 You could refer to this and read more details about custom DNS in ASE .
您可以参考此内容并阅读有关ASE中自定义DNS的更多详细信息。 Let me know if this works.
让我知道这个是否奏效。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.