JavaScript - XMLHttpRequest, Access-Control-Allow-Origin errors

前端 未结 2 544
南笙
南笙 2020-12-02 15:44

I\'m attempting to send a XMLHttpRequest to a paste site. I\'m sending an object containing all the fields that the api requires, but I keep getting this issue. I have read

2条回答
  •  执笔经年
    2020-12-02 16:39

    I've gotten same problem. The servers logs showed:

    DEBUG: <-- origin: null
    

    I've investigated that and it occurred that this is not populated when I've been calling from file from local drive. When I've copied file to the server and used it from server - the request worked perfectly fine

提交回复
热议问题