【发布时间】:2014-07-28 18:52:46
【问题描述】:
我正在尝试通过跨域请求通过 REST 与 Domino 通信,但遇到了问题。我已经设置了一个 Internet 站点文档,其中包含 IP 地址、本地主机和作为主机名列出的服务器名称。该互联网站点正在作为我在该互联网站点上设置的重定向规则运行。我还使用以下内容设置了网站规则:
现在,当我尝试通过 html GET 请求访问 rest.xsp 页面时,我收到了这个错误:
XMLHttpRequest cannot load
http://192.168.1.104/testing/restService.nsf/rest.xsp/testRest?reqType=UserCanAc…TOP&startId=BA4241EC74912860ED60FD1123473BF7&returnType=ARRAYOBJECTS.
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin
'http://127.0.0.1:8020' is therefore not allowed access.
以下是请求标头:
Accept:application/json, text/javascript, */*; q=0.01
Cache-Control:max-age=0
Origin:http://127.0.0.1:8020
Referer:http://127.0.0.1:8020/Backbone%20Playground/index.html
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36
我终其一生都无法弄清楚我错过了什么。有人能指出我正确的方向吗?
【问题讨论】:
-
这有帮助吗? markbarton.com/?p=344
-
这实际上是我最初用来设置它的页面,然后通过我从 Paul Whithers 找到的另一篇文章进行了验证(我认为,不确定)。
-
检查 GET 是 HTTP 1.1 而不是 1.0。
-
成功了吗?随意接受答案
-
目前有完全相同的问题!
标签: xpages lotus-domino