Google Contacts API: No 'Access-Control-Allow-Origin' header is present on the requested resource

点点圈 提交于 2019-12-04 03:55:33

问题


After working perfectly for about a month, I'm now getting a

No 'Access-Control-Allow-Origin' header is present on the requested resource.

Here's a simplified version of the ajax request.

var feedurl = "https://www.google.com/m8/feeds/contacts/EMAIL/full?oauth_token=TOKEN&max-results=50&alt=json&v=3.0";

$.ajax({
        url: feedurl,
        dataType: "json",
        success: function(data) {
            console.log(data);
            //do stuff
        }
    });

Changing dataType to jsonp doesn't change anything. In the google api console I have Accept requests from these HTTP referrers (web sites) set to https://*.MYWEBSITE.com/*

My only thought is that maybe Chrome/Safari became more restrictive in the latest updates.

来源:https://stackoverflow.com/questions/52302288/google-contacts-api-no-access-control-allow-origin-header-is-present-on-the-r

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