couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zachary Zolton <zachary.zol...@gmail.com>
Subject Re: JavaScript app working with two child domain.
Date Wed, 29 Dec 2010 16:10:10 GMT
Unless you're using the script tag's src attribute, the webpage's
JavaScript cannot make requests to a different subdomain:

http://stackoverflow.com/questions/2543784/javascript-same-origin-policy-how-does-it-apply-to-different-subdomains

—Zach

On Wed, Dec 29, 2010 at 1:35 AM, payam yousefi <payam.yousefii@gmail.com> wrote:
> I have two databases and v-host for each one
> app.lbd.com:5984 = /agaton/_design/lbd/_rewrite
> log.lbd.com:5984  = /log
> and a JavaScript client application that needs to work with both
> database and is accessible from this URL:
> http://app.lbd.com:5984/home
> Application sends POST requests to http://app.lbd.com:5984 and it works but
> when the application sends a POST request to http://log.lbd.com:5984
> It get ERROR : httpd 405 error "method_not_allowed","reason":"Only
> DELETE,GET,HEAD,POST allowed"
>
> Two domains are sub domain of lbd.com and child domains can request
> each other( it's not against same origin policy) so what's wrong?
>
> Thank you in advance for your help
> Best Regards
>

Mime
View raw message