CodeIgniter REST API Library Ajax PUT throwing 403 Forbidden

后端 未结 4 505
长情又很酷
长情又很酷 2021-01-02 11:51

I got the rest of the library working fully, just trying to generate api keys and its throwing a 403 forbidden when executed via ajax.

({\"status\":false,\"err

4条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-02 12:15

    If you are calling this from a different domain, you may be running into some XSS issues. You might have to run it from your own server and call the function from it's own domain or possibly use the JSONP capability.

    UPDATE: Are you able to see the transaction in Firebug using the NET Tab? Do you get JSON Back? Sometimes you have to add callback=? to the url request: http://dev.site1.com/api/key?callback=?

    Update2: Are you able to bring the page up in the browser: (http://dev.mapitusa.com/api/key) If you get the same error, you should try giving 777 (full read/write) permissions to the site.

提交回复
热议问题