Response to preflight request doesn't pass access control check

后端 未结 21 2453
别那么骄傲
别那么骄傲 2020-11-22 03:50

I\'m getting this error using ngResource to call a REST API on Amazon Web Services:

XMLHttpRequest cannot load http://server.apiurl.com:8000/s/login

21条回答
  •  北荒
    北荒 (楼主)
    2020-11-22 04:18

    For python flask server, you can use the flask-cors plugin to enable cross domain requests.

    See : https://flask-cors.readthedocs.io/en/latest/

提交回复
热议问题