【发布时间】:2013-07-30 23:26:54
【问题描述】:
我正在尝试在我的本地主机上设置 FullCalendar 来测试它。代码如下:
$( '.calendar' ).fullCalendar( {
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
eventSources: [
{
url: "http://www.google.com/calendar/feeds/feed_one",
className: 'feed_one'
},
{
url: "http://www.google.com/calendar/feeds/feed_two",
className: 'feed_two'
]
} )
我在控制台中收到此错误,但未显示事件:
XMLHttpRequest cannot load http://www.google.com/calendar/feeds/feed_one.
Origin http://localhost is not allowed by Access-Control-Allow-Origin. localhost:1
XMLHttpRequest cannot load http://www.google.com/calendar/feeds/feed_two.
Origin http://localhost is not allowed by Access-Control-Allow-Origin. localhost:1
根据我的研究,这似乎是Cross-Origin-Resource-Sharing 问题,但我不知道如何解决。
如果有人可以帮助我,或者指出我正确的方向,我将不胜感激。
【问题讨论】:
标签: fullcalendar cors crossdomain.xml