带有"https"的Azure Web App URL到Azure App Api请求不起作用

问题描述:

来自Azure Web App的对外部Azure App Api的Angularjs http请求失败,带有"https",但在url为http时有效.身份验证已在Web App中打开,但如果未通过身份验证,则无需执行任何操作.我想念什么?

Angularjs http request to external Azure App Api fails from Azure Web App with "https", but works when url is http. Authentication is turned on in Web App, but requires no action if not authenticated. What am I missing?

您的问题与Same Origin Policy有关,您可以在Same Origin Policy上找到

Your issue is about Same Origin Policy, on which you can find detials on this SO answer.

为了简而言之,您不能调用比当前页面更安全的资源(在这种情况下,您需要从HTTPS页面向HTTP资源发出AJAX请求).

To make long story short, you can't call a less secure resource than the page you are on (in your case making an AJAX request from an HTTPS page down to an HTTP resource).