Github Pages和子域的XMLHttpRequest错误

时间:2015-08-04 13:36:22

标签: javascript php jquery ajax github

我的自定义域使用我的Github Pages源(domain.github.io),但位于我帐户子域的php文件除外:http://files.mydomain.com/sendnotifications.php以保持信息与Github分离/私有。现在我的域名正在通过Github Pages,我在表单提交后收到此错误。

奇怪的是,表格仍然有效。它发送文本消息,但我仍然收到XMLHttpRequest错误(并且没有显示ajax成功)。

如果两个域都使用domain.com,为什么会出现错误?

  

XMLHttpRequest无法加载   http://files.MYDOMAIN.com/sendnotifications.php。起源   Access-Control-Allow-Origin不允许http://DOMAIN.com。   sendjquery-2.1.4.min.js:4:14958 ajaxjquery-2.1.4.min.js:4:10717   (匿名函数)formLogic.js:65 dispatchjquery-2.1.4.min.js:3:6472   handlejquery-2.1.4.min.js:3:3247

0 个答案:

没有答案