HTTP preflight (OPTIONS) request fails in IE only

前端 未结 2 1800
悲&欢浪女
悲&欢浪女 2020-12-11 11:24

I trying to make a POST request to my REST API. Here is the code snippet (using AngularJS):

        $http({
            method: \'POST\',
            url: ur         


        
2条回答
  •  悲哀的现实
    2020-12-11 11:49

    You could add sites to Trusted zone in IE settings and set "Access data sources across domains" to Enable (not Prompt):

    It works not only for IE 9, but 10+ as well.

    More on this: https://www.webdavsystem.com/ajax/programming/cross_origin_requests

提交回复
热议问题