我试图通过跨域请求通过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
我无法为自己的生活弄清楚我错过了什么。有人可以指出我正确的方向吗?
我知道这是一个老话题,但是由于没有得到答复并且有一些新闻,我认为值得把我自己的发现扔掉。
但是,由于Domino总是对印前检查响应401,因此我目前也在努力完成CORS任务(这很明显,因为未经身份验证,至少在Chrome中是这样)。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句