Azure Web App with “https” url to Azure App Api request not working

£可爱£侵袭症+ 提交于 2019-12-25 09:15:50

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!