Access-Control-Allow-Origin error when getting Wordpress posts in Phonegap app

后端 未结 4 1411
南笙
南笙 2021-02-09 22:42

Hopefully someone can help me to resolve the following problem while developing a mobile app in phonegap. I am attempting to read posts from a wordpress installation but I get t

4条回答
  •  礼貌的吻别
    2021-02-09 23:36

    Browsers don't allow cross domain calls in ajax by default. Jamie Starke gives you the answer. Maybe try to use $.support.cors = true; with JQuery. Anyway, a Phonegap app can do ajax cross domain requests. If you can't, check your config.xml http://docs.phonegap.com/en/edge/guide_whitelist_index.md.html

提交回复
热议问题