couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wojciech Kaczmarek <kaczmare...@gmail.com>
Subject workaround for cross-site PUTs
Date Tue, 09 Jun 2009 17:17:26 GMT
Hi!

I'm going to hack a Greasemonkey script which would automatically
update CouchDB docs from a webpage content. It needs to be done at the
browser side, server side is out of reach for modification.

I can't use XMLHttpRequest as it doesn't allow cross-site requests.
When using jQuery's ajax with jsonp (or whatever application of script
tag injection) the requests are limited to GETs. So I'm going to have
a layer in the CouchDB translating external GETs to document-writing
PUTs.

Is couchapp able to do this with some of its helpers or should I set
up external process catching the requests and sending appropiate PUTs?

(I could set up proxies or intermediate webapp instead, but I want to
avoid extra infrastructure and like an idea of making stuff able to
couch-replicate as much as possible; that's why external process seems
heavyweight as it requires preconfiguration instead of just
replication.)

cheers,
Wojtek

Mime
View raw message