Why does a cross-domain angularjs $http.post request fail when a XMLHttpRequest succeeds?

前端 未结 6 416
情歌与酒
情歌与酒 2021-02-01 10:32

I am trying to exercise the Trello API with an application key and token from an angular (version 1.0.5) webapp. The server seems correctly configured to handle CORS. A test req

6条回答
  •  悲&欢浪女
    2021-02-01 11:12

    To avoid this issue, create a function in the server side to catch the 'OPTIONS' and just return true. Some thing as follows.

        /**
         * @url OPTIONS /
         */
        public function options()
        {
            return;
        }
    

提交回复
热议问题