Hi I'm generating a POST XMLHTTPRequest to a remote server, but it's rejecting the post request. With a quick diff, I realize that the origin header of the XMLHTTPRequest from the XMLHTTPRequest I made has origin of chrome-extension://blahblahblahblahablahblah instead of the browser's url as origin. Is there a way to issue the request from the correct origin through chrome extension? Thanks!
问问题
1634 次
2 回答
0
您是否尝试使用内容脚本发送请求(以克服域问题)?
于 2013-06-04T11:05:20.550 回答
-1
如果您无法更改服务器的标头,则请求它的唯一方法是使用 jsonp。您可以在此处找到有关此内容的更多信息:JSONP 到底是什么?
于 2013-06-04T05:56:04.187 回答