问题
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?
回答1:
Your issue is about Same Origin Policy
, on which you can find detials on this SO answer.
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).
回答2:
@bsoulier lead me to the culprit. It was the Same Origin Policy, mistmatched protocol (web api url needed to be "https" as well) that was causing the problem.
来源:https://stackoverflow.com/questions/39369937/azure-web-app-with-https-url-to-azure-app-api-request-not-working