我在 scorm 云上设置了一个 LRS,我正在使用以下方法设置一个 LRS 对象tincan-min.js
:
lrs = new TinCan.LRS(
{
endpoint: "https://cloud.scorm.com/tc/xxxxxxxxxx/",
username: "me@example.com",
password: "mypassword",
allowFail: false
}
);
我可以使用以下命令从 localhost 发送和检索语句:
lrs.saveStatement(
statement, {
// error logging
});
但是,当我在一门课程中运行它时,我得到一个跨域请求失败(因为同源策略)。我不确定如何解决这个问题 - 在设置lrs
对象或发送语句时我可以修改什么吗?