How to use json proxy to access remote services during development

后端 未结 1 491
臣服心动
臣服心动 2021-01-26 06:48

This is my doubt after going through

How to send headers while using jsonp proxy?

and

How Ajax call is working in mobile app (PhoneGap), but not in PC b

相关标签:
1条回答
  • 2021-01-26 07:35

    I think for the development purpose you can disable cross domain policy in your browser as given here.

    1. create a short cut for the chrome browser in you desktop
    2. add the following flag to the short cut --disable-web-security

    Or

    You can setup your dev server to allow cross domain requests as given here or [here]

    1. Add the following header to your response Access-Control-Allow-Origin: *

    0 讨论(0)
提交回复
热议问题