Created
April 26, 2011 09:47
-
-
Save kybernetikos/942047 to your computer and use it in GitHub Desktop.
An attachment that can be put on a couchdb document to allow you to avoid the cross domain issue when using the Javascript API from a web page served from a different port on the same host (e.g. from a separate tomcat). It's very useful for development.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script type="text/javascript" src="/_utils/script/couch.js"></script> | |
<script type="text/javascript"> | |
document.domain = window.location.hostname; | |
if (window.parent.oncouchready) { | |
window.parent.oncouchready(CouchDB); | |
} | |
</script> | |
</head> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment