ajax cross domain not working in jquery

前端 未结 3 1955
自闭症患者
自闭症患者 2021-01-03 12:16

Error :

Response to preflight request doesn\'t pass access control check: The \'Access-Control-Allow-Origin\' header contains multip

3条回答
  •  温柔的废话
    2021-01-03 12:41

    The headers you send to the server from Javascript, should be returned by the server. If you have no access to the server this will be impossible. This means the server accepts your domain as a legal processor.

    Next to that you can try a JSONP call. Check this URL: https://learn.jquery.com/ajax/working-with-jsonp/

提交回复
热议问题