带有"https"的Azure Web App URL到Azure App Api请求不起作用 [英] Azure Web App with "https" url to Azure App Api request not working

查看:98
本文介绍了带有"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).

这篇关于带有"https"的Azure Web App URL到Azure App Api请求不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆