ajax call not working when trying to send data to localhost:8000 from localhost

后端 未结 5 1490
逝去的感伤
逝去的感伤 2020-12-06 19:33

When I\'m trying to make an AJAX call from php (localhost) to django (localhost:8000), it throws the following error.

XMLHt

5条回答
  •  情书的邮戳
    2020-12-06 19:59

    I swapped my internal IP (192.168.1.x) in the place of localhost and was able to call a XMLHttpRequest on it. This should do the trick without messing with cross origin policy.

提交回复
热议问题