JavaScript and CouchDB - How do I avoid cross-origin policy errors on GET/POST/PUT/DELETE requests
<p><em>I am posting this question on Stack Overflow as well. In my opinion this question overlaps the two...</em>
<br /><br /><br />
I am creating <a href="http://pastie.org/1144221" rel="nofollow">a simple JavaScript wrapper</a> for CouchDB's REST-ful interface, but I am stuck on same-origin policy issues.</p>

<p>So far I've been developing my code to work locally - and only as a proof of concept - on Mozilla FireFox. My server is running on localhost, port 5984.</p>

<p>To disable cross-origin policy in Mozilla FireFox you can use the <em>PrivilegeManager</em>, but it only gets me half-way in the sense that I can't do PUT requests against my server...</p>

<pre><code>/*
 * Including this in my JavaScript file only seems to disable cross-origin
 * policy checks for POST and GET requests in Mozilla FireFox.
 * PUT requests fail.
 */

netscape.security.PrivilegeManager.enablePrivilege(
    "UniversalBrowserRead UniversalBrowserWrite"
);
</code></pre>

<p><br /><br />
Is there any way that I can configure my server to hide it's location so I won't have to implement browser-specific work-arounds to avoid same-origin policy issues? If not: what browser work-arounds exist to disable same-origin policy completely?</p>
