Hy Sofadb'yi bir apache web sunucusundan kullanmak istiyorum, bunu kullanmak için couchdb sunucusunda cors istekleri yapmak zorundayım. Yani ne bu (localhost.maxbit89.conf) gibi bakmak apachenin yeni VirtualHost yapılandırma yaratıyordu yaptı:apache2 ve couchdb apache2'yi etkinleştirir
<VirtualHost *:80>
ServerAlias localhost.maxbit89
ServerName localhost.maxbit89
ServerAdmin [email protected]
DocumentRoot /var/www/localhost.maxbit89
<Directory /var/www/localhost.maxbit89/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
# Always set these headers.
Header always set Access-Control-Allow-Origin "*"
Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"
Header always set Access-Control-Max-Age "1000"
Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token"
# Added a rewrite to respond with a 200 SUCCESS on every OPTIONS request.
RewriteEngine On
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule ^(.*)$ $1 [R=200,L]
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
Ama uğraş herhangi isteği spezified başlıklarından hiçbiri yok. Herhangi bir vücut, nasıl couchdb + apache'yi doğru şekilde kullandığımı söyleyebilir mi?