Origin is not allowed by Access-Control-Allow-Origin

后端 未结 18 2932
北海茫月
北海茫月 2020-11-21 05:52

I\'m making an Ajax.request to a remote PHP server in a Sencha Touch 2 application (wrapped in PhoneGap).

The response from the server is the following:

18条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-21 06:09

    If you don't have control of the server, you can simply add this argument to your Chrome launcher: --disable-web-security.

    Note that I wouldn't use this for normal "web surfing". For reference, see this post: Disable same origin policy in Chrome.

    One you use Phonegap to actually build the application and load it onto the device, this won't be an issue.

提交回复
热议问题