Connection AJAX, CouchDB and JavaScript

前端 未结 2 1460
猫巷女王i
猫巷女王i 2021-01-06 00:42

i\'ve got a little problem with AJAX, CouchDB and JavaScript.

I can open the following URL from CouchDB in my browser: http://192.168.1.58:5984/mydb/name

<         


        
2条回答
  •  天命终不由人
    2021-01-06 01:14

    AJAX doesn't support cross domain scripting. all calls need to be to a URL with the same domain as the one of the current document. a good solution would be to build a proxy service on the server side, that will take the local request, make an HTTP call to the couchDB server, and return it's response.

提交回复
热议问题