Skip to content

Instantly share code, notes, and snippets.



Created Feb 28, 2014
What would you like to do?
Using Apache as s CORS-handling proxy to a CouchDB server
<IfModule !proxy_module>
LoadModule proxy_module /usr/lib/apache2/modules/
<IfModule !proxy_http_module>
LoadModule proxy_http_module /usr/lib/apache2/modules/
<IfModule !headers_module>
LoadModule headers_module /usr/lib/apache2/modules/
ProxyRequests Off
<Location /inventory/>
RewriteEngine On
RewriteRule /inventory/(.*) http://localhost:5984/inventory/$1 [P,L]
ProxyPassReverse http://localhost:5984/inventory/
Header set Access-Control-Allow-Origin "*"
#Header set Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept"
#Header set Access-Control-Allow-Methods "GET, PUT, POST, OPTIONS, DELETE, HEAD, COPY"
Header set Access-Control-Max-Age 3600
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.